[Lazarus] TIFF images

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] TIFF images

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

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] TIFF images

leledumbo
Administrator
AFAIK TTIFFImage (or something similar) is already supported in trunk.
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] TIFF images

Mattias Gaertner
On Fri, 15 Apr 2011 16:18:08 -0700 (PDT)
leledumbo <[hidden email]> wrote:

> AFAIK TTIFFImage (or something similar) is already supported in trunk.
>
> --
> View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-TIFF-images-tp2825743p2826501.html
> Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

Yes.
The fpimage backend is already in fpc 2.4.2.

Mattias

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] TIFF images

Marcos Douglas
In reply to this post by leledumbo
On Fri, Apr 15, 2011 at 8:18 PM, leledumbo <[hidden email]> 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

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus