reading txt:

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
snibgo
Posts: 12922
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

reading txt:

Post by snibgo »

Until recently, the TXT: "ImageMagick pixel enumeration" format did not need to list all the pixels to be successfully read.

The behaviour that not all pixels needed to be given is documented eg in https://www.imagemagick.org/Usage/files/#txt :
Reading TXT images is also valid. You do not need to define ALL the pixels in the image. In fact you do not even need to have the pixels in the correct order!
But this has broken.

For example, a text file called tettxt2.lis:

Code: Select all

# ImageMagick pixel enumeration: 2,1,65535,rgb
0,0: (1.1,2.2,3.3)
The image has two pixels, but only one is listed. That used to work fine, eg v6.9.9-50:

Code: Select all

f:\web\im>%IM%convert testtxt2.lis txt:
# ImageMagick pixel enumeration: 2,1,65535,rgb
0,0: (1,2,3)  #000100020003  rgb(0%,0%,0%)
1,0: (65535,65535,65535)  #FFFFFFFFFFFF  rgb(255,255,255)
But in recent IM, eg 7.0.8-64, that causes a failure:

Code: Select all

f:\web\im>%IMG7%magick testtxt2.lis txt:
magick: no images for write '-write' 'txt:' at CLI arg 2 @ error/operation.c/CLINoImageOperator/4816.
snibgo's IM pages: im.snibgo.com

User avatar
magick
Site Admin
Posts: 11220
Joined: 2003-05-31T11:32:55-07:00

Re: reading txt:

Post by magick »

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.

Post Reply