Half-byte shift in raw gray scale images?
Posted: 2008-07-07T00:41:29-07:00
I'm trying to use ImageMagick to create "Analyze Format" images, and the raw gray scale files are almost equivalent except for some reason they shift everything over half a byte. (i.e. if you are looking at it in a hex editor, instead of seeing "01 AB 23 CD" you see "1A B2 3C D4".)
I'll admit that I'm more than a bit over my head here, but everything else is exactly the same (after flipping the image), so if anyone either a) knows how to easily shift an entire file over by 4 bits (ideally using Perl) or b) knows what setting I can change to fix this, I'd really appreciate it.
The command I'm using is basically "convert <files> -flip -adjoin gray:combined_file.img". Thanks.
I'll admit that I'm more than a bit over my head here, but everything else is exactly the same (after flipping the image), so if anyone either a) knows how to easily shift an entire file over by 4 bits (ideally using Perl) or b) knows what setting I can change to fix this, I'd really appreciate it.
The command I'm using is basically "convert <files> -flip -adjoin gray:combined_file.img". Thanks.