Depth Splitting
Posted: 2015-10-29T02:52:08-07:00
Hi,
I want to convert a 16bit image to a stacked 8 bit image. I can do it like this:
This puts the high bits at the top and low bits at the bottom.
Now I want to do the opposite. I know it's some combination of -crop 100%x50% and -compose plus -composite, but I can't quite figure it out. First problem: when I do
I get two images, the top half and bottom half. I don't understand the stack well enough to know how to process index0 on the stack one way and index1 the other way, also I don't see why crop gives me a cropped part and the rest of the image, I thought it would give just one image.
Then, once I process each subimage (basically -evaluate multiply 256 on the first and nothing on the second), I want to merge the two images by just adding them. I'm not sure if it'll automatically create a 16bit image and it's only a matter of saving it, or if I need a -depth 16 in there somewhere.
If I can get this far, the next problem is converting a whole directory of images to my stacked format, but piping it to another program as an animated png or something with multiple pages, that I can read in another video editing program. Then I need to know how to accept a pipe of raw frames and convert them back to 16bit pngs. It's a bit complicated, I'll have to explain later.
Thanks for your help.
I want to convert a 16bit image to a stacked 8 bit image. I can do it like this:
Code: Select all
convert IMG_7853.png ( +clone -evaluate and 255 -evaluate multiply 256 ) -evaluate and 65280 -append -depth 8 test.png
Now I want to do the opposite. I know it's some combination of -crop 100%x50% and -compose plus -composite, but I can't quite figure it out. First problem: when I do
Code: Select all
convert test.png -crop 100%x50% test1.png
Then, once I process each subimage (basically -evaluate multiply 256 on the first and nothing on the second), I want to merge the two images by just adding them. I'm not sure if it'll automatically create a 16bit image and it's only a matter of saving it, or if I need a -depth 16 in there somewhere.
If I can get this far, the next problem is converting a whole directory of images to my stacked format, but piping it to another program as an animated png or something with multiple pages, that I can read in another video editing program. Then I need to know how to accept a pipe of raw frames and convert them back to 16bit pngs. It's a bit complicated, I'll have to explain later.
Thanks for your help.