2009.09.10 14:38 "[Tiff] 16-bit grayscale tiff to 8-bit grayscale in borland c++ (more info)", by Robert Zermeno

2009.09.11 00:37 "Re: [Tiff] 16-bit grayscale tiff to 8-bit grayscale in borland c++ (more info)", by Robert Zermeno

Bob -

Sorry if you received it twice..I tried selecting reply all (within yahoo mail), but it did not cc the maptools...So I am sending it again.  Sorry..

 
 
>Endian issues and actual data range seem like the parts to be fixed.
 

I already account for Endian byte reading (either big/little), but what do you mean by "actual data range"?  Can you please provide more insight?

 
>What is the reason you are not allowed to use libtiff?
 

I answered this in the other post, but I cannot use libtiff because the handheld device that will use this application cannot support libtiff (as mentioned by my team lead).  That is why I am build my own tiff reader from scratch.  I can already read various tiff file types of 1-bit, 4-bit, 8-bit, 24-bit, and 32-bit tiff and Geotiff images.

However, I am stuck on 16-bit grayscale images.  It is requested that my solution to make the output image to be a 8-bit grayscale image.

So, I would like to know more about some techniques I can use to scale down.  I can already process the image and view it, but the grayscale color output is wrong (like I mentioned before, many pixel values are too white).  So, simply converting 2-bytes to 1-byte does not do the trick. 

Would I have to alter the colortable used in my bmp object.  Right now, I only produce a grayscale table starting at R=G=B=0 for 1st, then R=G=B=256 for second and +256 for each value up to 256 count. 

If so, how could I refine my colortable?

 
Robert

--- On Thu, 9/10/09, Bob Friesenhahn <bfriesen@simple.dallas.tx.us> wrote:

On Thu, 10 Sep 2009, Robert Zermeno wrote:

> I was not sure how to make a response to the user for everyone to see.  I had just posted my first message.  Do I just reply to the user that had emailed me to email her back and everyone else will receive my mail as well???  Oh, well, sorry for the additional post, but i want to make clear that I cannot use any other programs, plug-ins, or add-ons to perform the functionality. 

On this list you need to do a "group reply" or else the email response will go to just the one person.

What is the reason you are not allowed to use libtiff?  Libtiff does not solve this particular scaling issue, but it certainly makes everything else related to TIFF easier.

> What could I be doing wrong to not get the image to display correctly???

Endian issues and actual data range seem like the parts to be fixed.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/