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 "-draw" text placement with gravity does not work as expected #1633

Closed
m7b opened this issue Jul 12, 2019 · 3 comments

Comments

@m7b
Copy link

commented Jul 12, 2019

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am using the latest version of ImageMagick
  • I have searched open and closed issues to ensure it has not already been reported

Description

Placing text with gravity are not working anymore.

result:
wrong_placement

expected result, created with ImageMagick-7.0.7-22-portable-Q16-x86:
expected

Steps to Reproduce

convert.exe -size 220x130 canvas:lightblue -draw "gravity NorthWest text 0,0 'NW' gravity NorthEast text 0,0 'NE' gravity North text 0,0 'N' gravity South text 0,0 'S' " result.png

System Configuration

  • ImageMagick version: ImageMagick-7.0.8-53-portable-Q16-x86
  • Environment (Operating system, version and so on): Win10
  • Additional information:
@m7b

This comment has been minimized.

Copy link
Author

commented Jul 12, 2019

Example with more gravity-options:

convert.exe -verbose -size 220x130 canvas:lightblue -draw "gravity NorthWest text 0,0 'NW' gravity North text 0,0 'N' gravity NorthEast text 0,0 'NE' gravity East text 0,0 'E' gravity Center text 0,0 'C' gravity West text 0,0 'W' gravity SouthWest text 0,0 'SW' gravity South text 0,0 'S' gravity SouthEast text 0,0 'SE'" result.png

expected:
expected2

actual:
wrong_placement2

@fmw42

This comment has been minimized.

Copy link

commented Jul 12, 2019

You should use magick not convert on IM 7. But I can confirm the same bad result using IM 7.0.8.53 on OSX Sierra with:

magick -size 220x130 canvas:lightblue -draw "gravity NorthWest text 0,0 'NW' gravity NorthEast text 0,0 'NE' gravity North text 0,0 'N' gravity South text 0,0 'S' " result.png

urban-warrior pushed a commit that referenced this issue Jul 13, 2019
Cristy
urban-warrior pushed a commit to ImageMagick/ImageMagick6 that referenced this issue Jul 13, 2019
@urban-warrior

This comment has been minimized.

Copy link
Contributor

commented Jul 13, 2019

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 @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jul 19, 2019
This update contains a number of security fixes.

2019-07-16  7.0.8-54 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-54, GIT revision 15916:e868e22:20190716.

2019-07-08  7.0.8-54 Cristy  <quetzlzacatenango@image...>
   * resolve division by zero  (reference
     ImageMagick/ImageMagick#1629).
   * introducing MagickLevelImageColors() MagickWand method.
  * Transient problem with text placement with gravity (reference
    ImageMagick/ImageMagick#1633).
  * Support TIM2 image format (reference
    ImageMagick/ImageMagick#1571).
  * For -magnify option, specify an alternative scaling method with -define
	  magnify:method=method, choose from these methods: eagle2X, eagle3X,
    eagle3XB, epb2X, fish2X, hq2X,  scale2X (default), scale3X, xbr2X.

2019-07-05  7.0.8-53 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-53, GIT revision 15828:f5d59c0:20190705.

2019-07-05  7.0.8-53 Cristy  <quetzlzacatenango@image...>
   * Fix -fx parsing issue (reference
     https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=36314).

2019-07-05  7.0.8-52 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-52, GIT revision 15825:ea47310:20190705.

2019-07-01  7.0.8-52 Cristy  <quetzlzacatenango@image...>
  * Eliminate buffer overflow in TranslateEvent() (reference
    ImageMagick/ImageMagick#1621).

2019-06-30  7.0.8-51 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-51, GIT revision 15812:51f11c4:20190630.

2019-06-24  7.0.8-51 Cristy  <quetzlzacatenango@image...>
  * Clone rather than copy X window name/icon.
  * Optimize PDF reader.

2019-06-23  7.0.8-50 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-50, GIT revision 15778:4a60519:20190623

2019-06-14  7.0.8-50 Dirk Lemstra <dirk@lem.....org>
  * Added support for reading all images from a HEIC image (reference
    ImageMagick/ImageMagick#1391).
  * Heap-buffer-overflow in MagickCore/fourier.c (reference
   ImageMagick/ImageMagick#1588).
  * Fixed a number of issues (reference
    https://imagemagick.org/discourse-server/viewforum.php?f=3).
  * Fixed a number of issues (reference
    https://github.com/ImageMagick/ImageMagick/issues).
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jul 23, 2019
graphics/ImageMagick: security fix

Revisions pulled up:
- graphics/ImageMagick/Makefile.common                          1.191
- graphics/ImageMagick/distinfo                                 1.208

---
   Module Name:	pkgsrc
   Committed By:	nia
   Date:		Fri Jul 19 09:12:13 UTC 2019

   Modified Files:
   	pkgsrc/graphics/ImageMagick: Makefile.common distinfo

   Log Message:
   ImageMagick: Update to 7.0.8-54

   This update contains a number of security fixes.

   2019-07-16  7.0.8-54 Cristy  <quetzlzacatenango@image...>
     * Release ImageMagick version 7.0.8-54, GIT revision 15916:e868e22:20190716.

   2019-07-08  7.0.8-54 Cristy  <quetzlzacatenango@image...>
      * resolve division by zero  (reference
        ImageMagick/ImageMagick#1629).
      * introducing MagickLevelImageColors() MagickWand method.
     * Transient problem with text placement with gravity (reference
       ImageMagick/ImageMagick#1633).
     * Support TIM2 image format (reference
       ImageMagick/ImageMagick#1571).
     * For -magnify option, specify an alternative scaling method with -define
   	  magnify:method=method, choose from these methods: eagle2X, eagle3X,
       eagle3XB, epb2X, fish2X, hq2X,  scale2X (default), scale3X, xbr2X.

   2019-07-05  7.0.8-53 Cristy  <quetzlzacatenango@image...>
     * Release ImageMagick version 7.0.8-53, GIT revision 15828:f5d59c0:20190705.

   2019-07-05  7.0.8-53 Cristy  <quetzlzacatenango@image...>
      * Fix -fx parsing issue (reference
        https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=36314).

   2019-07-05  7.0.8-52 Cristy  <quetzlzacatenango@image...>
     * Release ImageMagick version 7.0.8-52, GIT revision 15825:ea47310:20190705.

   2019-07-01  7.0.8-52 Cristy  <quetzlzacatenango@image...>
     * Eliminate buffer overflow in TranslateEvent() (reference
       ImageMagick/ImageMagick#1621).

   2019-06-30  7.0.8-51 Cristy  <quetzlzacatenango@image...>
     * Release ImageMagick version 7.0.8-51, GIT revision 15812:51f11c4:20190630.

   2019-06-24  7.0.8-51 Cristy  <quetzlzacatenango@image...>
     * Clone rather than copy X window name/icon.
     * Optimize PDF reader.

   2019-06-23  7.0.8-50 Cristy  <quetzlzacatenango@image...>
     * Release ImageMagick version 7.0.8-50, GIT revision 15778:4a60519:20190623

   2019-06-14  7.0.8-50 Dirk Lemstra <dirk@lem.....org>
     * Added support for reading all images from a HEIC image (reference
       ImageMagick/ImageMagick#1391).
     * Heap-buffer-overflow in MagickCore/fourier.c (reference
      ImageMagick/ImageMagick#1588).
     * Fixed a number of issues (reference
       https://imagemagick.org/discourse-server/viewforum.php?f=3).
     * Fixed a number of issues (reference
       https://github.com/ImageMagick/ImageMagick/issues).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.