Post reply

Message icon                                  
(Clear Attachment)
(more attachments)
Restrictions: 6 per post, maximum total size 4096KB, maximum individual size 2048KB
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
Enter or copy Vampyre Imaging Library as an verification (we ge a lot of registration spam):

shortcuts: hit alt+s to submit/post or alt+p to preview

Topic Summary

Posted by: wchris
« on: 10 February 2013, 15:19:56 »

Hello there  :)

As I had a workaround I did not comme often here lately.

But now that I have spotted your answer I'll check it out.

Thank you very much  8)
Posted by: Galfar
« on: 3 January 2013, 20:36:17 »


of what type exactly is MainImage?

Basically you must make sure that
Image.Picture.Bitmap (Image.Picture.Graphic) is of TImagingBitmap type before assigning.
If regular VCL TBitmap is there then transparency won't work.

What works for me is this:
Code: Pascal
  1. // app start
  2. ImagingGraphic := TImagingBitmap.Create;
  3. Image.Picture.Graphic := FBitmap;
  4. ...
  5. // image was updated
  6. ImagingGraphic.Assign(MainImage);
  7. Image.Picture.Assign(nil);
  8. Image.Picture.Assign(ImagingGraphic);
  9. ...
  10. // app exit
  11. Image.Picture.Assign(nil);
  12. ImagingGraphic.Free;
Posted by: wchris
« on: 17 December 2012, 11:37:40 »

Hello again,

I still have one stupid question. (I say stupid because I have the feeling there's a perfectly logical explanation, but I can't figure out why myself)

in 0.78 this time.

why if I do   Image1.Picture.Graphic.Assign(MainImage); once transparancy works.

but if I do it twice


I loose the transparancy of the main background image ? shouldn't it give the same result ?


If you pass by  ;)
Thank you

PS: the annoying thing is of course that in my own code (the real one, not the alpha example above) I must re-do assign when I dynamically change the image watermark.

EDIT: Ok finally got a workaround like this :

  Image1.Picture.Bitmap := TImagingBitmap.Create;

If there's a better way, please tell me  8)

EDIT : I seemed to work, but i get an AV later in my component when I free & recreate the bitmap. Will have to find another way to keep transparency when re-assigning.

Finally I ended up doing this :

  Image1.Picture := Tpicture.Create;
  Image1.Picture.Bitmap := TImagingBitmap.Create;

Quite sure there's a direct faster way, but can't figure it out.
Posted by: wchris
« on: 15 December 2012, 19:25:59 »


I have just discovered Vampyre Imaging Library a few weeks ago. Sofar i'm impressed by the work done. Congrats

So I'm a newbie, still learning, and maybe it's not a bug but my fault ? I don't know.

I have prepared a small demo of my code with 4 buttons.

The 2 first button draw an image with alpha transparancy on another image without transparancy and work ok.

The 2 last button attempt to draw the same image with alpha transparancy, but this time on another image WITH alpha transparancy. And I get an "invalid floating point operation".

I use Delphi XE2 Starter, on Windows 7 32bits, and VIL 0.26.4

I have included the required assets in the subdirectories \debug and \release

Cheers  :)

Edit : just found out about 0.78 ... maybe i'll give this version a try  8)

RE-EDIT: works perfectly with latest source code 0.78 !!! Nothing to do !  ;D I can go on, Thank you vervy much !