RE: Need help creating TIF and opening

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Richard (Richard_at_discussions.microsoft.com)
Date: 10/07/04


Date: Thu, 7 Oct 2004 11:07:02 -0700

Hi,

In past lives I've coded custom TIF reader/writer code; multi page 12 bit
gray scale images with custom tag data for each page. I dunno how much
support you've got in .NET for all of the many many things that TIF can do -
so the first thing I'd recommend is figure out exactly what TIF features you
need and see if the .NET framework supports them. Questions:

1) In what format is the SQL BLOB data?

2) In addition to multiple pages what other TIF features do you need?
Compression? Bizarre color depth? Grayscale? Custom data tags?

After a quick scan of MSDN, here are some relevant .NET namespaces and
classes:

System.Drawing
  Bitmap
  Image
  ImageConverter
  ImageFormatConverter
System.Drawing.Imaging
  ImageFormat

If the .NET framework does NOT support what you need then I would seriousely
consider looking for a third party tool that meets your requirements. I used
one last century, I can't remember what it was, I think it was "Image Gear" -
it was a very good tool with an extrememly simple API, try googling on that...

However, if you find yourself in the situation that I was in --> custom gray
scale bitmap format from a newly developed hardware device, requirement for
code with a tiny footprint that could run embedded on the new device, a need
to store TIF custom data tags, and googling and asking everyone you know and
you still couldn't find a tool or API to do it for you. - then you're
probably going to have to write some TIF code...

If you decide to write your own code then I would STRONGLY recommend that
you write the TIF code from C++. I don't have code with me but I do remember
a few things about TIF format 1) byte order for some TIF headers must be hard
coded to little/big endian format {I forget which}, 2) You will find yourself
defining several header structs and then positioning them at various raw byte
offsets in the file as you read/write data. IMHO these lower level byte
manipulation tasks are better suited for C++; I'm certain that you could do
the work from unsafe C# code but C++ code would probably be more natural to
work with...

lotsa luck...

--Richard

P.S. If you do find yourself needing to write your own code {and I hope you
don't} then there is a book out there - I think it's called "The Encyclopedia
of Graphic File Formats" or something like that, it describes TIF format in
exhausting detail...

"Phil" wrote:

> k, here is my issue.. I have BLOB data in SQL that needs to be grabbed and
> made into a TIF file and placed on the client (could be in temp internet
> dir). The reason we need it in TIF format is there are multiple pages per
> invoice.
>
> How can I grab the data, make the TIF, place it on the client and then Open
> with the clients default program for veiwing TIF's (usually Microsoft Picture
> and Fax Viewer).
>
> Please help.



Relevant Pages

  • RE: hyperlink opens with wrong application
    ... My custom .tif viewer is already the ... default application (which Windows Explorer does recognize). ...
    (microsoft.public.word.docmanagement)
  • Column setting to accept custom date
    ... I wanted to know if there is a way to add a custom date to both tif and pdf ... files that you can display in windows explorer and use to sort. ... Previously used TIF images but not use PDF. ... don't match with the custom information" I added to the TIF file. ...
    (microsoft.public.win2000.file_system)
  • RE: hyperlink opens with wrong application
    ... TIF extension. ... > custom application works. ... But when I follow the hyperlink through Word 2000, ... > it opens with Windows imaging instead. ...
    (microsoft.public.word.docmanagement)
  • Re: Best format question
    ... Recently I discovered that this format is prone to progressive quality loss over successive saves. ... Trying to research this issue I came to the conclusion that TIF might be better for storage. ... So will it help if I get the JPG images off the camera and immediately convert them to TIF before doing anything else with them? ...
    (rec.photo.digital)
  • Re: Best format question
    ... I discovered that this format is prone to progressive quality loss over ... One or two of my images show this, ... Trying to research this issue I came to the conclusion that TIF might be ... my camera only produces JPGs. ...
    (rec.photo.digital)