-
Notifications
You must be signed in to change notification settings - Fork 60
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
Basic image trim with background #327
Comments
Hi Alec, you'd need to ask image_processing (it's not my project), but at the CLI it'd be:
Or in Ruby:
You can draw a box to visualize the rect with:
Making: |
Oh heh the github downsizer as made the 1px box invisible. Click on the image to see the rect. |
.... sorry, last post, as I recall image_processing lets you drop down to ruby-vips as part of the chain of operations, so you'd need to add a line like:
somewhere. Have a look at the image_processing docs. |
Yeah, I wondered if that was the right place but figured all that gem does is pass options through to VIPS. Sounds like perhaps Will open an issue there about this. Thanks for your useful reply anyway! |
I'm switching to VIPS from ImageMagick since Rails has made it the default in version 7, via image_processing gem.
I'm struggling with a basic "trim" to remove excess pixels (white in this case) around a product image:
As mentioned in this blog post with ImageMagick these are the options to trim:
I'm not sure what the equivalent is with VIPS. From my reading I expected
find_trim
to work i.e.But this doesn't work. Any ideas what I'm doing wrong?
I'd also like to remove the white background entirely in the case of logos i.e. replace white with transparent. With ImageMagick it's:
But again I can find no VIPS equivalent for this. These seem like quite common transforms that should work with similar options?
The text was updated successfully, but these errors were encountered: