#1 Re: GDI+ » GIF, TIF, PNG and JPG pictures TGraphic read/write via GDI+ » 2012-03-16 15:26:24

AB, Your code work as intended. I did a new project with only a button and a TImage and it worked as you pointed.


After inspecting my project where I am creating the TImage on runtime I found my error and now I can use what I expected:

   Image.Picture.LoadFromFile('D:\test.jpg')

and it is working !

Thank you for you help

#2 Re: GDI+ » GIF, TIF, PNG and JPG pictures TGraphic read/write via GDI+ » 2012-03-15 21:19:02

I have the same result.

No error in the process but the image does not render in the container canvas ( a TPanel ). Any other idea ?

#3 Re: GDI+ » GIF, TIF, PNG and JPG pictures TGraphic read/write via GDI+ » 2012-03-10 15:26:22

I am trying to use the SynGDIPlus in Delphi7 and Win7 to load a jpg file but I can´t do it work.
First I tried

jpg.LoadFromFile('d:\teste.jpg');
Image.Picture.Bitmap := jpg.Bitmap

After I tried to undefine the NOTSYNPICTUREREGISTER and use

image.Picture.LoadFromFile('d:\teste.jpg')

In both cases, no error given but the image don´t renderize anything on screen.

If I use the original TJPEGImage and use this code, it works

var

jpg.LoadFromFile('d:\teste.jpg');
Image.Picture.Bitmap.Assign(jpg)

Any clues ?

Board footer

Powered by FluxBB