EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Signature image is distorted

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#28943
Posted: 03/25/2014 07:10:22
by Dolores Bonilla (Basic support level)
Joined: 03/25/2014
Posts: 1

I need to load a imagen in the background. I tried a lot of format (jpg, png, bmp) but nothing works.

The only thing I've got is this:

Sig.SignatureType := stDocument;
Sig.Invisible := false;
sig.WidgetProps.BackgroundStyle:= pbsCustom;
sig.WidgetProps.Background.Height:= 32;
sig.WidgetProps.Background.Width:= 32;
Sig.WidgetProps.Background.ColorSpaceType:= pcstRGB;
sig.WidgetProps.Background.ImageType:= pitCustom;
MS := TMemoryStream.Create;
try
MS.LoadFromFile('C:\Usuarios\dbs_trial\password.bmp');
MS.Seek(0, soFromBeginning);
SetLength(aBArray, MS.size);
MS.ReadBuffer(aBArray[0], Length(aBArray));
Sig.WidgetProps.Background.Data:= aBArray;
sig.WidgetProps.HideDefaultText:= True;
finally
MS.free;
end;

But the image is distorted (show attachment).

Tahnks.[QUOTE]


#28945
Posted: 03/25/2014 07:31:03
by Dmytro Bogatskyy (EldoS Corp.)

Thank you for contacting us.

Quote
But the image is distorted (show attachment).

For image type pitCustom and color space type pcstRGB the TElPDFImage.Data property should contain RGB image (3 byte per pixel), without any additional information like BMP file header.

Quote
tried a lot of format (jpg, png, bmp) but nothing works.

The jpeg and jpeg2000 formats (only JP2 bitmap format) are supported by pdf standard, in this case image type should be pitJPEG or pitJPEG2000 accordingly.
Please, see: https://www.eldos.com/documentation/sb...etype.html

Note, Background.Height and Width properties should match image dimensions.

Reply

Statistics

Topic viewed 468 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!