Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
glennrp
Posts: 1147 Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W
Post
by glennrp » 2014-01-20T18:47:40-07:00
There's no header so you need -size WxH and because Cb and Cv aren't recognized
as input formats you have to do something like
Code: Select all
mv Bretagne2.Cp temp.gray
convert -size WxH -resize 50% temp.gray ~/Downloads/Bretagne2-ds.Cb
mv Bretagne2.Cv temp.gray
convert -size WxH -resize 50% temp.gray ~/Downloads/Bretagne2-ds.Cv
michaels
Posts: 11 Joined: 2014-01-16T14:47:22-07:00
Authentication code: 6789
Post
by michaels » 2014-01-21T15:17:47-07:00
Thanks. But I get an 'unexpected end of file error:
The original image Bretagne1.ppm from
http://www.openjpeg.org/index.php?menu=samples . is 640X480.
Code: Select all
$ mv Bretagne2.Cb temp.gray
$ convert -size 640x480 -resize 50% temp.gray ~/Downloads/Bretagne2-ds.Cb
convert: unexpected end-of-file `temp.gray': @ error/gray.c/ReadGRAYImage/205.
glennrp
Posts: 1147 Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W
Post
by glennrp » 2014-01-21T16:08:57-07:00
michaels wrote: Thanks. But I get an 'unexpected end of file error:
The original image Bretagne1.ppm from
http://www.openjpeg.org/index.php?menu=samples . is 640X480.
Code: Select all
$ mv Bretagne2.Cb temp.gray
$ convert -size 640x480 -resize 50% temp.gray ~/Downloads/Bretagne2-ds.Cb
convert: unexpected end-of-file `temp.gray': @ error/gray.c/ReadGRAYImage/205.
You have to account for the downsampling while creating *.Cb and *.Cv; use -size 320x240 to read temp.gray.