Error Unable To Resize Image Negative Or Zero Image Size
Sign in Pricing Blog Support Search GitHub This repository Watch 7 Star 56 Fork 35 excellenteasy/grunt-image-resize Code Issues 11 Pull requests 2 Projects 0 Pulse Graphs New issue Command failed: convert: negative or zero image size #25 Closed UYEONG opened this Issue May 20, 2015 · 2 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 1 participant UYEONG commented May 20, 2015 gm has been updated as version 1.18.1. And image-resize throws errors with gm 1.18.1. It's okay with 1.17.0, so there might be an issue with their recent updates. Running "image_resize:dist" (image_resize) task Warning: Command failed: convert: negative or zero image size `client/static/img/sp_2x.png' @ error/resize.c/ResizeImage/2968. Use --force to continue. UYEONG commented May 21, 2015 'image_resize': { dist: { options: { width: '50%' }, files: { 'client/static/img/sp.png': 'client/static/img/sp_2x.png' } } }, // 1.17.0 is okay. but, it has a problem 1.18.1 gm('test/fixtures/gnu.jpg').resize('50%', 0); // no gm('test/fixtures/gnu.jpg').resize('50%', undefined) // okay UYEONG commented May 21, 2015 with this code, I could solve the problem options: { width: '50%', height: '50%' }, UYEONG closed this May 21, 2015 Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. Terms Privacy Security Status Help You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Resize image by length with image magick up vote 1 down vote favorite I'm trying to resize a image by its length, the width https://github.com/excellenteasy/grunt-image-resize/issues/25 should remain. Is sounds quite easy, but somehow i don't get it. I'm using it together with PHP via the command line. I'm using ImageMagick 6.7.3-9 By reading the docs, i would do the following: /usr/local/bin/mogrify -resize x200! myimg.png That gives me: mogrify: negative or zero image size `bbb.png' @ error/resize.c/ResizeImage/2570. My goal is, that if bbb.png is w:400 h:400 i can resize it to w:400 h:200. mogrify -resize x200 //Height with new width mogrify -resize http://stackoverflow.com/questions/8396869/resize-image-by-length-with-image-magick 200 //Width with new height mogrify -resize 200! //New Width, old height Can someone explain me, what I am doing wrong? Thanks imagemagick image-resizing share|improve this question edited Dec 7 '11 at 5:17 blahdiblah 21.3k1368119 asked Dec 6 '11 at 8:05 handy 118138 Also present on 6.7.3-1. Seems like a bug since it works fine for width. –blahdiblah Dec 7 '11 at 5:43 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote Known broken, now fixed. Fix should be in ImageMagick-6.7.4-0 Beta available 2011-12-08. share|improve this answer answered Dec 7 '11 at 21:35 blahdiblah 21.3k1368119 Thanks :)I'm gonna try it! –handy Dec 12 '11 at 11:37 add a comment| up vote -1 down vote I have not found your Image Geometry fromat -resize x200! in documentation. I think you should use xheight or widthxheight! I.e.: -resize x200 or -resize 400x200!. share|improve this answer answered Dec 6 '11 at 8:21 chance 2,38442951 No, xheight calculates the width, I want to stretch it. Just resize the height. The doc says: ! forces the geometry i passed. Of course, could first get the width and then do $width x200!. This works, but i realyl think there is a better way. –handy Dec 6 '11 at 9:07 add a comment| Your Answer draft saved draft d
Errors Exceptions Generators References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Context options and parameters Supported http://php.net/manual/en/function.imagecopyresampled.php Protocols and Wrappers Security Introduction General considerations Installed as CGI binary Installed as an Apache module Session Security Filesystem Security Database Security Error Reporting Using Register Globals User Submitted Data Magic Quotes Hiding PHP Keeping Current Features HTTP authentication with PHP Cookies Sessions Dealing with XForms error unable Handling file uploads Using remote files Connection handling Persistent Database Connections Safe Mode Command line usage Garbage Collection DTrace Dynamic Tracing Function Reference Affecting PHP's Behaviour Audio Formats Manipulation Authentication Services Command Line Specific Extensions Compression and Archive Extensions Credit Card Processing Cryptography Extensions Database Extensions Date error unable to and Time Related Extensions File System Related Extensions Human Language and Character Encoding Support Image Processing and Generation Mail Related Extensions Mathematical Extensions Non-Text MIME Output Process Control Extensions Other Basic Extensions Other Services Search Engine Extensions Server Specific Extensions Session Extensions Text Processing Variable and Type Related Extensions Web Services Windows Only Extensions XML Manipulation Keyboard Shortcuts? This help j Next menu item k Previous menu item g p Previous man page g n Next man page G Scroll to bottom g g Scroll to top g h Goto homepage g s Goto search(current page) / Focus search box imagecopyresized » « imagecopymergegray PHP Manual Function Reference Image Processing and Generation GD GD and Image Functions Change language: English Brazilian Portuguese Chinese (Simplified) French German Japanese Korean Romanian Russian Spanish Turkish Other Edit Report a Bug imagecopyresampled (