[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

convert a tiff image to jpeg or load into a timage

Posted on 2006-10-30
2
Medium Priority
?
3,215 Views
Last Modified: 2013-11-19
easy, question:

convert a tiff image to jpeg or load into a timage

i asked in other forum too but by moment not good answers, i know that exist efgs webpages and other.....

http://www.delphipages.com/threads/thread.cfm?ID=173914&G=173914

but by moment, not code for try convert..

thanks
0
Comment
Question by:jamiguel
[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
2 Comments
 
LVL 17

Assisted Solution

by:Wim ten Brink
Wim ten Brink earned 80 total points
ID: 17840455
Basically, load the TIFF image in a graphic class that can handle TIFF images, create a new JPG graphic object with the same width and height as the TIFF image and then draw the TIFF file on the JPG canvas. Basically, that's one way to convert a TIFF to a JPG.
Then again, depending on the graphics classes used in your code, you might even use something like TJPeG.Assign(TTIFFGraphic) which might do the convertion for you. Or not. It's just that there are quite a few options for this and all of them have their pro's and cons.

http://www.soft-gems.net/Graphics.php is a good library...
0
 
LVL 9

Accepted Solution

by:
bernani earned 120 total points
ID: 17979542
Hi,

TIFF in Delphi, pre-compiled LibTiff for Borland Delphi - See
http://www.awaresystems.be/index.html
http://www.awaresystems.be/imaging/tiff/delphi.html

look at the thread
http://www.asmail.be/msg0055535082.html wich gives you:

Unit LibTiffDelphiHigherLevel;

interface

uses Windows, SysUtils, Classes, Graphics, Controls, Forms, LibTiffDelphi; {uses LibTiffDelphi, download it here: http://www.awaresystems.be/imaging/tiff/delphi.html }

function ReadTIFFFileIntoBitmap(Filename: String): TBitmap;
procedure VisualizeTIFFFileInImage(Filename: String; Image: TImage);

...

procedure VisualizeTIFFFileInImage(Filename: String; Image: TImage);
var
m: TBitmap;
begin
  try
  m:=ReadTIFFFileIntoBitmap(Filename);
  Image.Picture.Assign(m);
  m.Destroy;
 except
 Image.Picture.Assign(nil);
 end;
end;

Create a TJpegImage and assign before saving as jpg.

Sample to read and write a tiff :
http://esibert.developpez.com/delphi/libtiff/


http://delphipage.free.fr/formats.html

http://delphipage.free.fr/programmes/tiff2bmp.zip
http://delphipage.free.fr/programmes/bmp2tiff.zip


See also:
http://studio.imagemagick.org/script/index.php
and
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/formats/#vector : Typical conversion problem JPEG to TIFF...

and maybe also: http://www.logicnet.dk/lib/

ImageFileLib
Version 1.16, 2005-10-09
Freeware, full C++ and Delphi source included
Download from SourceForge.net
With this library, Delphi programs can read and write BMP, JPEG, JPEG 2000, PNG, MNG, TIFF, ICO, CUR and PCX images. RAS, PNM, PGM, PPM, HIPS images can be loaded, but not created. This version was tested with Delphi 7, but should also work with 5, 6 and 2005. It is based in part of my own code and implementation of some of the file formats, and in part on other freeware image processing libraries.

__________________________________

Hope this can help to read, write and convert from one format to other

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Learn the basics of inputting and editing your text components in Prezi. We will cover how to set styles, position, and group your text components. In your Prezi editor, click anywhere on the canvas to add text: A flashing cursor informs you that yo…
In addition to being a great web-based presentation tool, Prezi also makes it easy to save your presentation as a PDF to share with others as well. Learn how in this tutorial. Select the share icon from the top menu in your Prezi editor: Select "D…
Suggested Courses

656 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