Menu

#563 tile:<image> appears to blow image up by 100% before applying tiling

v1.0_(example)
closed-fixed
tile (1)
4
2018-05-21
2018-05-21
No

Steps to reproduce:

Using a 100x100 image box.jpg, enter the following:

gm convert -size 200x200 tile:box.jpg box2.jpg
gm convert -size 400x400 tile:box.jpg box3.jpg

Expected Behavior:

box2.jpg is a 2x2 tile of the original 100x100 box.jpg image
box3.jpg is a 4x4 tile of the original 100x100 box.jpg image

Actual Behavior:

box2.jpg is a 1x1 tile of a 200x200 copy of box.jpg
box3.jpg is a 2x2 tile of a 200x200 copy of box.jpg

One can fairly easily work around this by simply creating a canvas that is 2x as large as necessary and then resizing it back down, but obviously this shouldn't be necessary, and can be a hassle for more complex command strings.

Discussion

  • Bob Friesenhahn

    Bob Friesenhahn - 2018-05-21

    This is a very interesting finding. The problem is specific to the
    JPEG file format (and the few other formats responding to -size) since
    -size influences the image size that libjpeg returns. If you use an
    input format which does not respond to -size, then the issue will not
    occur.

    Bob

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2018-05-21
    • status: open --> closed-fixed
    • assigned_to: Bob Friesenhahn
    • private: Yes --> No
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2018-05-21

    This problem is fixed by Mercurial changeset 15657:f298a4c346e5. Thank you for the bug report.

     
  • Patrick Putnam

    Patrick Putnam - 2018-05-21

    Cheers! Thanks for the fast response.

     

Log in to post a comment.

MongoDB Logo MongoDB