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.
Half-byte shift in raw gray scale images?
Re: Half-byte shift in raw gray scale images?
ImageMagick should reproduce the same pixel values when all you are doing is flipping. Can you post a URL to one of your images so we can run your command and reproduce the problem?
Re: Half-byte shift in raw gray scale images?
I've looked into it some more and there are bigger differences between the two formats which are posing difficulties. I'll probably have to stick with scripting ImageJ (which has support for "Analyze format" images) rather than using ImageMagick and trying to figure out the slight differences in the two binary formats. Thanks for the quick response though. -Dave