Well, the bit shift in the reply above, was designed to convert color to black and white, or some sort of greyscale manipulation, IIRC ; like I said, I didn't have the time to really dig into what muppet was saying in:
$data = pack "C*", map { $_ >> 8 } unpack "S*", $raw;
However, there MAY be a way to modify the map, to selectively remove the high (or low) 8 bits of the image, to convert down to 24 bit from 32 bit. It may be a simple as changing the shift to
$data = pack "C*", map { $_ << 8 } unpack "S*", $raw; # >> to <<
or you may need to break the geotiff bits into r g b segments, and bit shift each segment the proper amount and direction. ???

It may be worth posting the above map as a new node, and asking the c and bit experts if they see a way. It would help if you could describe exactly the bit-field structure of the 32-bit geotiffs that you are dealing with. This is actually a very interesting question.


I'm not really a human, but I play one on earth My Petition to the Great Cosmic Conciousness

In reply to Re^3: 32 bit images using Pixbuf by zentara
in thread 32 bit images using Pixbuf by deadpickle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.