Here is what I did
$ identify ~/Downloads/sd04/png_txt/figs_0/f0001_01.png
/home/lxuser/Downloads/sd04/png_txt/figs_0/f0001_01.png PNG 512x512 512x512+0+0 8-bit RGB 256c 212KB 0.000u 0:00.000
$ convert ~/Downloads/sd04/png_txt/figs_0/f0001_01.png f0001_01.rgb
$ identify f0001_01.rgb
identify: must specify image size `f0001_01.rgb' @ error/rgb.c/ReadRGBImage/144.
$ identify -size "512x512" f0001_01.rgb
f0001_01.rgb RGB 512x512 512x512+0+0 16-bit TrueColor sRGB 786KB 0.020u 0:00.020
identify: unexpected end-of-file `f0001_01.rgb': No such file or directory @ error/rgb.c/ReadRGBImage/237.
I am using
$ convert --version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2017-07-31 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib
on 64 bit ubuntu OS .
converted png to raw then identify says unexpected EOF
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: converted png to raw then identify says unexpected EOF
You saved the RGB image as 8 bits/channel, but you are using Q16, so that is the default depth for reading. Use "-depth 8" in the read:
Code: Select all
identify -size "512x512" -depth 8 f0001_01.rgb
snibgo's IM pages: im.snibgo.com
Re: converted png to raw then identify says unexpected EOF
ok , i will try and report back.
Re: converted png to raw then identify says unexpected EOF
Can the rgb image I have made in original post be called raw pixmap ?
Re: converted png to raw then identify says unexpected EOF
I am trying to convert a png image to format suitable for this utility .
It mentions raw pixmap as an option.
https://github.com/lessandro/nbis/blob/ ... an1/cwsq.1
It mentions raw pixmap as an option.
https://github.com/lessandro/nbis/blob/ ... an1/cwsq.1
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: converted png to raw then identify says unexpected EOF
In the context of grayscale fingerprints, "raw pixmap" might mean a headerless image file with one byte per pixel, 0=black and 255=white. IM can make this with ".gray" format, eg:
Code: Select all
conver rose: out.gray
snibgo's IM pages: im.snibgo.com
Re: converted png to raw then identify says unexpected EOF
i will try that
Re: converted png to raw then identify says unexpected EOF
That works.
Thanks a lot snibgo .
For somebody else who wants to convert image to wsq so that mindtct can detect minutae in it.
convert <input_image> sth.gray
identify -size <imgXximgY> -depth 8 sth.gray # to verify sth.gray
cwsq <compressionratio> wsq sth.gray -raw_in <imgX,imgY,8>
0.75 will make smaller wsq file in comparison to 3 .
I am guessing, they have recommended compression ratio of 3 .
Cannot understand tags (.br,.RE,.RS,.I,.TP) strewn all over https://raw.githubusercontent.com/lessa ... an1/cwsq.1 .
Thanks a lot snibgo .
For somebody else who wants to convert image to wsq so that mindtct can detect minutae in it.
convert <input_image> sth.gray
identify -size <imgXximgY> -depth 8 sth.gray # to verify sth.gray
cwsq <compressionratio> wsq sth.gray -raw_in <imgX,imgY,8>
0.75 will make smaller wsq file in comparison to 3 .
I am guessing, they have recommended compression ratio of 3 .
Cannot understand tags (.br,.RE,.RS,.I,.TP) strewn all over https://raw.githubusercontent.com/lessa ... an1/cwsq.1 .