Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-04

TIFF images

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marcos Douglas

Hi,
I want to work with TIFF images. Lazarus do not provide support to this format, by default.
So, I found the PicViewer project:
http://breakoutbox.de/pascal/applications.html

I downloaded the demo[1] and ran. Was OK, very good... I can load the TIFF images.
But before load the image, the Demo prints the message "Please wait a moment..." in the TImage using this code:

>>>>>>>>>>>>>>>>>>>>>>>>
        // clear previous Image :
        Image.Picture.Clear;
        Image.Canvas.Brush.Color:= Panel2.Color;   // = clBtnFace;
        Image.Canvas.FillRect( 0, 0, Image.Width, Image.Height);
        // Show the "please wait.." text on the canvas :
        Image.Canvas.TextOut( (Image.Width -Image.Canvas.TextWidth( s)) div 2,
                              Image.Height div 2, s);
>>>>>>>>>>>>>>>>>>>>>>>>

That's OK... but if I compile the project[2] this message above is not visible and the Image background is changed to black... before the image file is loaded.

The README.txt file, in directory of project, say: "The Source Code was successfully compiled with Lazarus 0.9.29 rev 28140 from 2010-11-08"

I'm using Lazarus 0.9.30.1 r29237 FPC 2.4.3 i386-win32-win32/win64

What's the difference? Something changed in Image.Canvas?

Thanks,
Marcos Douglas

[1] http://breakoutbox.de/files/PicViewerExampleApplication.zip [2] http://breakoutbox.de/files/PicViewer0.02.zip

Reply by email

Marcos Douglas
to leledumbo: AFAIK TTIFFImage (or something similar) is already supported in trunk. View this message…
leledumbo wrote
AFAIK TTIFFImage (or something similar) is already supported in trunk.
The error was in this line:
    Image.Canvas.Brush.Color:= Panel2.Color;   // = clBtnFace;

The Panel2.Color was clDefault, not clBtnFace...
(Excuse my lack of attention)

BTW, I need a solution that works in Delphi 7 too. The PicViwer project uses FreeImage[1] DLL and it works in Delphi and Lazarus. I need to write/read TIFF images from SQLServer and show them. My software already works with JPEG imagens (scanned or file) but it will work with TIFF images too. Now is Delphi 7. In the future will be converted to Lazarus. Thanks, [1] http://freeimage.sourceforge.net/ Marcos Douglas

Reply by email