Converting the file format to TIFF. Some questions?

I have a proprietary SNG image format (proprietary format) that has a separate array of image data along with the image metadata in a separate HDR file.

Now I need to convert this SNG format to TIFF 6.0 standard format. So I studied the TIFF format i.e. About its headers, image file directories (IFDs) and deprived image data.

Now I have little worries about this conversion. Please help me.

  • SNG Continuous Data vs TIFF Stripped Data: Should I convert SNG data to TIFF as continuous data in one stripe (data load / edit time problem?) OR create logical StripOffsets from SNG image data.

  • The SNG data header uses only the required meta information, so when converting SNG to TIFF, some information cannot be obtained, such as NewSubFileType, Software Tag, etc.

    So there is a concern that after conversion is there any information needed about the missing directories like NewSubFileType, Software Tag, etc. and a sufficient condition for the TIFF file.

  • Encode each pixel component of RGB swatch in SNG data:

Here, each SNG Image Data Strip per Pixel component is encoded as:

Out^[i] := round( LineBuffer^[i * 3] * **0.072169**  +  LineBuffer^[i * 3 + 1] * **0.715160** + LineBuffer^[i * 3+ 2]* **0.212671**); 

      

The only way I can get out of it is that each pixel is represented by 3 RGB components and some factor is multiplied by each component to make the SNG Viewer work with the RGB color information from the SNG Image Data. (Developer who previously worked on this left, now I follow the trail :))

So when converting this to TIFF, decoding needs to be done. Is this a concern that the RBG information in the TIFF is being generated or would we rather need this information?

Please, help...

+2


a source to share


2 answers


Can you load this into a standard windows bitmap descriptor? If so, there are probably tons of free and commercial libraries out there for saving to TIFF.

The standard for TIFF is libtiff, which is a C library. Here is the Delphi version made by an expert in TIFF format:

http://www.awaresystems.be/imaging/tiff/delphi.html

There seem to be many options.

I think the approach



  • Loading your format into a standard in-memory bitmap (what you have to do to show it, right?)
  • Using a pre-existing TIFF encoding library to save as TIFF

It will be much easier than trying to do a direct format to format conversion. The only reasons I won't do this are as follows:

  • Bitmap is too large to be stored in memory
  • The original format is lost and I will lose more quality when re-encoding, but you will need to keep the standard lossy format (JPEG) to keep the quality.

Disclaimer: I work for Atalasoft .

We create .NET image processing codecs (including TIFF) that are much easier to use than LibTiff - you can call them in Delphi via COM. We can convert standard Windows bitmaps to TIFF or PDF (or other formats) with a few lines of code.

+1


a source


One approach, if you have a Windows application that processes and can print this format, is to let it do the job for you and call it to print the file with one of the many "printer drivers" available that support direct output to TIFF.



+1


a source







All Articles