Noticed an inconsistency with Pseudo-filename '-' across different versions of ImageMagick

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?".
Post Reply
Rahul
Posts: 8
Joined: 2016-09-12T15:52:59-07:00
Authentication code: 1151

Noticed an inconsistency with Pseudo-filename '-' across different versions of ImageMagick

Post by Rahul »

Greetings,

I noticed an inconsistency in few ImageMagick versions but please consider this question specific to IMv7.0.7. I'm using Windows 2012R2 (64-bit) to test below commands and directly invoking it in Command Prompt.

I'm trying to write and read from the standard streams using a pseudo-filename 'TIFF:-' and '-' and this seems very inconsistent across different versions in my limited experience. I just wanted to confirm if I'm not the only one who is having this issue.

Below is the command I used against IMv6.x (Convert PNG to TIFF and dump its information):
"C:\Program Files (x86)\ImageMagick-6.8.8-Q8\convert.exe" -depth 8 -type TrueColorMatte "test.png" TIFF:- | "C:\Program Files (x86)\ImageMagick-6.8.8-Q8\identify.exe" -verbose -
(I tested on IMv6.8.8 and IMv6.9.9. And, it works fine with IMv6.8.8 but doesn't produce any output for IMv6.9.9)

The same command I used against IMv7.x:
"C:\Program Files (x86)\ImageMagick-7.0.7-Q8\magick.exe" -depth 8 -type TrueColorMatte "test.png" TIFF:- | "C:\Program Files (x86)\ImageMagick-7.0.7-Q8\magick.exe" identify -verbose -
(This works on IMv7.0.4 and IMv7.0.6 but not with IMv7.0.7.)

Installers:
IMv7.0.7 = ImageMagick-7.0.7-21-Q8-x86-static.exe
IMv7.0.6 = ImageMagick-7.0.6-10-Q8-x86-static.exe
IMv7.0.4 = ImageMagick-7.0.4-10-Q8-x86-static.exe
IMv6.9.9 = ImageMagick-6.9.9-33-Q8-x86-static.exe
IMv6.8.8 = ImageMagick-6.8.8-6-Q8-x86-static.exe

Let me know if you need any other information.

Regards,
Rahul Patel
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Noticed an inconsistency with Pseudo-filename '-' across different versions of ImageMagick

Post by fmw42 »

Proper IM syntax is to red the input first. IM 6 is forgiving, but IM 7 is not. Try

"C:\Program Files (x86)\ImageMagick-7.0.7-Q8\magick.exe" "test.png" -depth 8 -type TrueColorMatte TIFF:- |
"C:\Program Files (x86)\ImageMagick-6.8.8-Q8\identify.exe" -verbose -

This works fine for me in IM 7.0.7.21 Q16 Mac OSX
magick logo: -depth 8 -type truecolormatte TIFF:- | identify -verbose -
Rahul
Posts: 8
Joined: 2016-09-12T15:52:59-07:00
Authentication code: 1151

Re: Noticed an inconsistency with Pseudo-filename '-' across different versions of ImageMagick

Post by Rahul »

@fmw42:

Still not working on 7.0.7-Q8. How do you explain that the same command works on 7.0.4 and 7.0.6?

Working syntax:
"C:\Program Files (x86)\ImageMagick-7.0.6-Q8\magick.exe" "test.png" -depth 8 -type TrueColorMatte TIFF:- | "C:\Program Files (x86)\ImageMagick-7.0.6-Q8\magick.exe" identify -verbose -
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Noticed an inconsistency with Pseudo-filename '-' across different versions of ImageMagick

Post by fmw42 »

Have you tried 7.0.7.21? Perhaps it is a Windows Imagemagick issue or a Q8 issue? I was using Q16.
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Noticed an inconsistency with Pseudo-filename '-' across different versions of ImageMagick

Post by GeeMack »

Rahul wrote: 2018-01-19T12:46:01-07:00Still not working on 7.0.7-Q8. How do you explain that the same command works on 7.0.4 and 7.0.6?
Using IM 7.0.7-21 Q16 HDRI on Windows 10. This command results in no output at all...

Code: Select all

magick logo: TIFF:- | magick identify -verbose -
It does display all the verbose information if I output the command on the left of the pipe in other formats like "JPEG:-" or "PNG:-"

If I try to output that "TIFF:-" through the pipe and into another "magick" convert command it results in an error.

Code: Select all

magick logo: TIFF:- | magick - test.png

magick: no images for write '-write' 'test.png' at CLI arg 2 @ error/operation.c/CLINoImageOperator/4789.
It looks like the "TIFF:-" isn't producing any output at all. This appears to be a bug.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Noticed an inconsistency with Pseudo-filename '-' across different versions of ImageMagick

Post by fmw42 »

In IM 7.0.7.21 Q16 Mac OSX, these both work fine

Code: Select all

magick logo: TIFF:- | magick - test.png
The above produce test.png that looks like logo:

Code: Select all

magick logo: -depth 8 -type truecolormatte TIFF:- | magick identify -verbose -
The above produces verbose information

So it would seem to be a Windows issue.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Noticed an inconsistency with Pseudo-filename '-' across different versions of ImageMagick

Post by snibgo »

Code: Select all

magick logo: TIFF:- | magick - test.png
This works with no problem on v7.0.3-5 on Windows 8.1.
snibgo's IM pages: im.snibgo.com
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Noticed an inconsistency with Pseudo-filename '-' across different versions of ImageMagick

Post by GeeMack »

fmw42 wrote: 2018-01-19T19:44:40-07:00So it would seem to be a Windows issue.
I posted a note in the Bugs forum.
Rahul
Posts: 8
Joined: 2016-09-12T15:52:59-07:00
Authentication code: 1151

Re: Noticed an inconsistency with Pseudo-filename '-' across different versions of ImageMagick

Post by Rahul »

Thank you all for promptly looking into this issue!
Thanks GeeMack for reporting a bug in Bugs forum and it seems IM team already fixed in 7.0.7-22 Beta.
Bug Link: http://www.imagemagick.org/discourse-se ... =3&t=33397

Regards,
Rahul Patel
Post Reply