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

able to remove black/white whitespace #39

Closed
kleisauke opened this Issue Feb 12, 2017 · 0 comments

Comments

2 participants
@kleisauke
Member

kleisauke commented Feb 12, 2017

able to remove black/white whitespace [3083264]

Submitted by sinz on 17-8-2012 0:00:00
1 votes on UserVoice prior to migration

able to trim/remove black bar such as on youtube.
eg: http://i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg to http://i.imgur.com/hBDi4.png

Response

by Andries Louw Wolthuizen on 5-1-2013 0:00:00

Wrote an implementation for your idea, would you please test this option for me?
I added the parameter “&trim”, with the option of setting the sensitivity. Default this sensitivity is 10.
The sensitivity defines how black/white/etc the borders must be. For example: your image has a colored border ranging from #000000 (pitch black) to #0F0000.
Example with default sensitivity:
http://images.weserv.nl/?url=i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg&trim
Example with sensitivity of 20:
http://images.weserv.nl/?url=i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg&trim=20
Example with a lot of other options, and a sensitivity of 20:
http://images.weserv.nl/?url=i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg&trim=20&h=200&w=200&t=square
Any comments are welcome!

Comments

Comment by Andries Louw Wolthuizen (Webmaster, Images.weserv.nl - Image cache & resize proxy) on 17-8-2012 21:39:00

Nice idea! Will try to write an implementation for this, thanks for the suggestion!

Comment by Andries Louw Wolthuizen (Webmaster, Images.weserv.nl - Image cache & resize proxy) on 29-9-2012 19:47:00

Wrote an implementation for your idea, would you please test this option for me?
I added the parameter "&trim", with the option of setting the sensitivity. Default this sensitivity is 10.
The sensitivity defines how black/white/etc the borders must be. For example: your image has a colored border ranging from #000000 (pitch black) to #0F0000.
Example with default sensitivity:
http://images.weserv.nl/?url=i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg&trim
Example with sensitivity of 20:
http://images.weserv.nl/?url=i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg&trim=20
Example with a lot of other options, and a sensitivity of 20:
http://images.weserv.nl/?url=i.ytimg.com/vi/9bZkp7q19f0/hqdefault.jpg&trim=20&h=200&w=200&t=square
Any comments are welcome!

Comment by sinz on 3-10-2012 10:10:00

awesome man!!

Comment by Hammad on 3-12-2012 20:44:00

Just Want to say thanks alot for this wonderful service,it will save alot of cpu usage and memory for me

Comment by scc on 6-10-2014 12:40:00

Super useful, thanks!

Original UserVoice Submission

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment