Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert crashes when label is empty #5530

Closed
bnelson333 opened this issue Sep 3, 2022 · 3 comments
Closed

convert crashes when label is empty #5530

bnelson333 opened this issue Sep 3, 2022 · 3 comments

Comments

@bnelson333
Copy link

ImageMagick version

6.9.10-23 Q16 x86_64 20190101

Operating system

Linux

Operating system, version and so on

Ubuntu Server 20.04

Description

Not sure if you know about this or if it's anything that needs fixing, but I have a use case where I need convert to create an image with an empty label. I found that when I include no text, it crashes. When I include null space, it runs fine. See examples in Steps to Reproduce.

Steps to Reproduce

This will cause a failure:
convert -background "#FFFFFF" -size 1920x1080 -fill "#000000" -pointsize 100 -gravity center label:'' test.jpg

Failure message:

convert-im6.q16: unable to open image convert': No such file or directory @ error/blob.c/OpenBlob/2874. convert-im6.q16: no decode delegate for this image format ' @ error/constitute.c/ReadImage/560.
convert-im6.q16: no images defined `test.jpg' @ error/convert.c/ConvertImageCommand/3258.

However, running the command as such will work, no error:
convert -background "#FFFFFF" -size 1920x1080 -fill "#000000" -pointsize 100 -gravity center label:'\n' test.jpg

Images

No response

@snibgo
Copy link

snibgo commented Sep 3, 2022

I need convert to create an image with an empty label.

You are using "label:", which creates an image with the required text. What image do you expect it to create when there is no text?

@dlemstra
Copy link
Member

dlemstra commented Sep 3, 2022

I would expect an error message to be shown when the label is an empty string.

@urban-warrior
Copy link
Member

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

urban-warrior pushed a commit that referenced this issue Sep 3, 2022
urban-warrior pushed a commit to ImageMagick/ImageMagick6 that referenced this issue Sep 3, 2022
urban-warrior pushed a commit to ImageMagick/ImageMagick6 that referenced this issue Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants