Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: 32 bit images using Pixbuf

by deadpickle (Pilgrim)
on Mar 10, 2009 at 06:20 UTC ( [id://749509]=note: print w/replies, xml ) Need Help??


in reply to Re: 32 bit images using Pixbuf
in thread 32 bit images using Pixbuf

Thanks for the reply. I gave it a try and got an image. Though the image was crazy looking. Not sure if it is better to keep hunting for a way to resample, or find a source for geotiffs that are samplable, or to just load the window with a set of bounds.

Replies are listed 'Best First'.
Re^3: 32 bit images using Pixbuf
by zentara (Archbishop) on Mar 10, 2009 at 11:23 UTC
    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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://749509]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-26 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found