Problems with resizing a previously rendered label

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?".
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problems with resizing a previously rendered label

Post by snibgo »

My test was with IM v7.0.3-5, and the result is much cleaner than the OP (v7.0.4-8). Perhaps there is a bug in that version.

The OP result looks like what I get when I use "-sample" instead of "-resize".
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: Problems with resizing a previously rendered label

Post by GeeMack »

snibgo wrote: 2017-02-13T23:01:49-07:00My test was with IM v7.0.3-5, and the result is much cleaner than the OP (v7.0.4-8). Perhaps there is a bug in that version.
I agree. Using Windows HDRI static, when I run the commands using IM 7.0.4-8 there is a pretty obvious stairstep effect along the edges. When I simply change the command from "magick" to "convert" to run it on IM 6.9.7-6 the result is noticeably better.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problems with resizing a previously rendered label

Post by snibgo »

I've reported this as a bug: viewtopic.php?f=3&t=31405
snibgo's IM pages: im.snibgo.com
GarbageSauce
Posts: 23
Joined: 2016-12-08T19:43:17-07:00
Authentication code: 1151

Re: Problems with resizing a previously rendered label

Post by GarbageSauce »

Yeah I think it is a bug. I downloaded ImageMagick-6.9.7-8-Q16-HDRI-x64-dll.exe and installed that. Results come back much nicer. I appreciate the help guys. It seems as though when one bug gets fixed, another manifests. Frustrating isn't it.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Problems with resizing a previously rendered label

Post by magick »

Add -channel RGBA to your command-line. Does that resolve the problem?
GarbageSauce
Posts: 23
Joined: 2016-12-08T19:43:17-07:00
Authentication code: 1151

Re: Problems with resizing a previously rendered label

Post by GarbageSauce »

It does not.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Problems with resizing a previously rendered label

Post by magick »

Did you try:

Code: Select all

magick asdf.png -channel rgba -resize '240x90^>!' test.png
We tried and compared to the results from IMv6 and got a RMSE of 32 whereas without -channel rgba we got 5925:

Code: Select all

-> compare -metric rmse test.png imv6.png diff.png
31.9101 (0.000486917)
GarbageSauce
Posts: 23
Joined: 2016-12-08T19:43:17-07:00
Authentication code: 1151

Re: Problems with resizing a previously rendered label

Post by GarbageSauce »

Oh I tried putting the -channel rgba after the resize argument originally. Putting it before seems to do it. Is there any reason why that is?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Problems with resizing a previously rendered label

Post by magick »

Consider it a transient problem. We were trying to better align IMv7 with IMv6 given IMv7's enhanced channel support. Our alignment obviously did not work. We will push a new point release likely tomorrow to fix this problem.
GarbageSauce
Posts: 23
Joined: 2016-12-08T19:43:17-07:00
Authentication code: 1151

Re: Problems with resizing a previously rendered label

Post by GarbageSauce »

Interesting. Well, software development can be frustrating. Thanks again and good luck.
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Problems with resizing a previously rendered label

Post by GeeMack »

A few tests using IM 7.0.4-9 (on Windows 10 64) seem to indicate this problem has been resolved.
GarbageSauce
Posts: 23
Joined: 2016-12-08T19:43:17-07:00
Authentication code: 1151

Re: Problems with resizing a previously rendered label

Post by GarbageSauce »

Yay! Can I just say that the this community is one of the best in terms of direct support than any other I have used. Props.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problems with resizing a previously rendered label

Post by fmw42 »

GarbageSauce wrote: 2017-02-14T09:48:09-07:00 Oh I tried putting the -channel rgba after the resize argument originally. Putting it before seems to do it. Is there any reason why that is?
Yes, settings must come before the operators that use those settings.
Post Reply