Page 1 of 1

please help with adding a value to greyscale image

Posted: 2015-09-28T02:02:31-07:00
by steveh2112
sorry but i'm new to imagemagick, i hope someone can help a simple task

i have a 16 bit per pixel, greyscale, raw format image (pc format data). (its a heightmap) i need to add a value to every pixel, say add 10, then save back as a raw file.

i think i need to use the math expression feature but can't figure it out, can anyone help?

(by the way, i changed the .raw file to 16 bit .tif and opened it in imagemagick and it looks ok so i can work with tif if its easier)

thx

Re: please help with adding a value to greyscale image

Posted: 2015-09-28T03:06:23-07:00
by steveh2112
i got it,
C:\Program Files\ImageMagick-6.9.2-Q16>.\convert.exe \in.tif -fx '+.01'
c:\Users\me\Desktop\out.tif

Re: please help with adding a value to greyscale image

Posted: 2015-09-28T07:35:12-07:00
by snibgo
"-evaluate Add" will be much faster:

Code: Select all

convert in.tif -evaluate Add 10 out.tif