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

Added Image.extent #233

Merged
merged 2 commits into from Nov 7, 2018

Conversation

5 participants
@euphoris
Contributor

euphoris commented Apr 22, 2015

Added wand.image.Image.extent method using MagickExtentImage.

@coveralls

This comment has been minimized.

coveralls commented Apr 22, 2015

Coverage Status

Coverage decreased (-0.2%) to 84.69% when pulling 7bae0d4 on euphoris:extent into 1c5f2a4 on dahlia:master.

3 similar comments
@coveralls

This comment has been minimized.

coveralls commented Apr 22, 2015

Coverage Status

Coverage decreased (-0.2%) to 84.69% when pulling 7bae0d4 on euphoris:extent into 1c5f2a4 on dahlia:master.

@coveralls

This comment has been minimized.

coveralls commented Apr 22, 2015

Coverage Status

Coverage decreased (-0.2%) to 84.69% when pulling 7bae0d4 on euphoris:extent into 1c5f2a4 on dahlia:master.

@coveralls

This comment has been minimized.

coveralls commented Apr 22, 2015

Coverage Status

Coverage decreased (-0.2%) to 84.69% when pulling 7bae0d4 on euphoris:extent into 1c5f2a4 on dahlia:master.

@coveralls

This comment has been minimized.

coveralls commented Apr 22, 2015

Coverage Status

Coverage increased (+0.07%) to 84.96% when pulling 5cea4cf on euphoris:extent into 1c5f2a4 on dahlia:master.

2 similar comments
@coveralls

This comment has been minimized.

coveralls commented Apr 22, 2015

Coverage Status

Coverage increased (+0.07%) to 84.96% when pulling 5cea4cf on euphoris:extent into 1c5f2a4 on dahlia:master.

@coveralls

This comment has been minimized.

coveralls commented Apr 22, 2015

Coverage Status

Coverage increased (+0.07%) to 84.96% when pulling 5cea4cf on euphoris:extent into 1c5f2a4 on dahlia:master.

if height is None:
height = self.height
if width < 1:
raise ValueError('image width cannot be zero')

This comment has been minimized.

@yoloseem

yoloseem Jan 7, 2016

Contributor

How about writing more condition-describable error message? e.g. "image width must be greater than zero". With current message, .extend(width=-10) will also raise "image width cannot be zero."

This comment has been minimized.

@emcconville

emcconville Nov 7, 2018

Owner

I believe that zero values are valid parameters for MagickExtentImage. If I remember correctly, ImageMagick will preserve previous value. For example...

 $ convert rose: -extent 0x10 output.png
 $ identify output.png
 #=> output.png PNG 70x10 70x10+0+0 8-bit sRGB 1621B
@xmedeko

This comment has been minimized.

xmedeko commented Nov 1, 2018

-extent is useful for resize and space fill. Please, finish and merge this PR.

@emcconville emcconville added this to the 0.4.5 milestone Nov 2, 2018

@emcconville emcconville merged commit 5cea4cf into emcconville:master Nov 7, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.07%) to 84.96%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment