Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
transparent jpeg images |
Post Reply |
Author | |
divo
Beginner Joined: 18 Aug 09 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 11 Nov 09 at 3:56PM |
Hi there,
I have a problem with grayscale jpeg images. If I add a grayscale jpeg and set an image mask for transparency no error is thrown, but if your view the pdf via Acroread 9.2 it informs you about an error on the page. Below is a small program that reproduces the behaviour. (I'm using Delphi2009) At the end of this post is a base64 encoded 1x1-px jpeg that one can use. Is this a bug in the library or am I doing something wrong here? program error; {$APPTYPE CONSOLE} uses SysUtils, QuickPDF0717; var QP: TQuickPDF0717; retval: Integer; begin try QP:= TQuickPDF0717.Create; if QP.UnlockKey(YOUR KEY HERE) = 0 then raise Exception.Create('UnlockKey'); if QP.NewDocument = 0 then raise Exception.Create('NewDocument'); if QP.AddImageFromFile('error.jpg', 0) = 0 then raise Exception.Create('AddImageFromFile'); if QP.SetImageMask(0.9, 0.9, 0.9, 1, 1, 1) = 0 then raise Exception.Create('SetImageMask'); if QP.DrawScaledImage(0, QP.ImageHeight, 0.5) = 0 then raise Exception.Create('DrawImage'); if QP.SaveToFile('dummy.pdf') = 0 then raise Exception.Create('SaveToFile'); except on E:Exception do begin Writeln(E.Classname, ': ', E.Message); Readln; end; end; end. /9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEP ERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/wAALCAABAAEBAREA/8QAFAABAAAAAAAA AAAAAAAAAAAACP/EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAD8AZb//2Q== |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store