Allowing use of GraphicsMagick as conversion tool#3
Open
wcgallego wants to merge 2 commits intotechnopagan:masterfrom
Open
Allowing use of GraphicsMagick as conversion tool#3wcgallego wants to merge 2 commits intotechnopagan:masterfrom
wcgallego wants to merge 2 commits intotechnopagan:masterfrom
Conversation
added 2 commits
August 5, 2016 15:10
We're computing the original image png base64 on every iteration of the loop, which is pretty wasteful. In the worst case scenario here, we never do any loops in the while and we calculate the original image png base64 unnecessarily, but that should be a rare enough scenario where this optimization is preferred
By default, it will still use ImageMagick (convert command) for conversion from jpeg -> png. Supplying imagick as the third param will also do this. Using gmagick, though, will use GraphicsMagick tool for this conversion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey! Thanks for putting this together - caught your Velocity 2016 talk and was psyched to implement at my shop.
We're using GraphicsMagick over here so I added an option to use such. Not hung up on the implementation, just 'worked'.
I also pulled out the conversion to png and base64 for the input image from the while loop as it was unnecessary to do it on each iteration, shaving off a few ms.