Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Gif and tif file support to JPEGImage

Posted on 1998-11-16
6
Medium Priority
?
475 Views
Last Modified: 2013-11-19
Hi!
How i can add gif and tif file support to JPEGImage, is there any dlls for that or some other way to add that support.

mhieta
0
Comment
Question by:mhieta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 7

Expert Comment

by:BlackMan
ID: 1346950
There is a great FW GIF component (with source) at www.melander.dk
0
 

Accepted Solution

by:
scheiko earned 60 total points
ID: 1346951
Hi mhieta,

I think you'll find everything you're looking for on http://www.melander.dk/delphi/gifimage/index.html

Just download the source and follow the installation instructions...

Good luck!

Scheiko
0
 
LVL 2

Author Comment

by:mhieta
ID: 1346952
Thanks all for answering that question. I don't know if i understanding correctly, with the TJPEGImage to support gifs, is that correct?.

mhieta

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 2

Author Comment

by:mhieta
ID: 1346953
I need also support to tiff images using the JPEGImage.

mhieta
0
 

Expert Comment

by:scheiko
ID: 1346954
I've never heard of a patch or TTIFFImage object.

You can use the standard borland delphi3 TJPEGImage object to LoadFromFile a JPG picture:

Procedure TForm1.Button1Click (Sender:TObject);
var aJPG: TJPEGImage;
begin
     aJPG:=TJPEGImage.Create; {New JPEG Instance}
     if OpenDialog1.Execute then begin {If you've selected a filename}
          try
               aJPG.LoadFromFile; {Load the JPG from disk}
               PaintBox1.Canvas.Draw(0,0,aJPG); {Draw the JPG starting at (0,0)}
          finally
               aJPG.Free;
          end;
     end;
end;

The same construction is used for the TGIFImage:

Procedure TForm1.Button1Click (Sender:TObject);
var aGIF: TGIFImage;
begin
     aGIF:=TGIFImage.Create; {New GIF Instance}
     if OpenDialog1.Execute then begin {If you've selected a filename}
          try
               aGIF.LoadFromFile; {Load the GIF from disk}
               PaintBox1.Canvas.Draw(0,0,aGIF); {Draw the GIF starting at (0,0)}
          finally
               aGIF.Free;
          end;
     end;
end;

Use the Canvas.StretchDraw(TRect,Image) function to resize the pictures. You can not change the JPG's parameters. You'll need to copy the JPG to a TBitMap first, work on the bitmap, and then create a new TJPEGImage which is a copy of your bitmap.

Good luck!

Scheiko


0
 
LVL 2

Author Comment

by:mhieta
ID: 1346955
Thanks Scheiko.

mhieta
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Keep your audience engaged and get the most out of your next presentation with these quick Prezi tips.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Learn how to set up basic frames and paths in Prezi and understand the open space that Prezi allows you to create presentations in.
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question