carrierwave-vips icon indicating copy to clipboard operation
carrierwave-vips copied to clipboard

support auto_rotate

Open jcupitt opened this issue 10 years ago • 9 comments

See https://github.com/jcupitt/ruby-vips/issues/53

vipsthumbnail now has an autorotate feature, it might be possible to use part of that for ideas.

https://github.com/jcupitt/libvips/blob/master/tools/vipsthumbnail.c#L138

jcupitt avatar Mar 30 '14 09:03 jcupitt

@eltiare sorry to ping you directly, Is it possible for us to get this feature added?.

Thank You.

arkmediastudio avatar Apr 14 '14 09:04 arkmediastudio

No worries, I've been a bit busy with work and taking care of a sick wife. I'll get this here fairly soon.

eltiare avatar Apr 16 '14 15:04 eltiare

No problem, i will wait. Thank you for making this gem. :+1:

arkmediastudio avatar Apr 17 '14 06:04 arkmediastudio

I am still waiting for this . Can you please see https://github.com/lovell/sharp/commit/a94dd2b3544a1d97a645a7b9bbd28487fd5ff7d8 if that helps to implement the feature in carrierwave-vips.

Thank You

arkmediastudio avatar Jun 09 '14 09:06 arkmediastudio

I'm running into problems reading the EXIF data. I've added comments on jcupitt/ruby-vips#53

eltiare avatar Jun 19 '14 00:06 eltiare

Thanks to @jcupitt I got the issue resolved. Can you please test to make sure that it works properly for you? Be sure to use the code in the master branch on Github as I've not yet pushed the changes to RubyGems.

eltiare avatar Jun 19 '14 14:06 eltiare

I looked over the code and it seems reasonable, but I don't have a good carrierwave test setup so I didn't actually test it. Someone with a nice set of test images should try it and report.

jcupitt avatar Jul 12 '14 14:07 jcupitt

hi @eltiare i have tested it but couldn't get this working. i am testing this using https://github.com/eltiare/carrierwave-vips/blob/master/spec/fixtures/portrait-with-orientation.jpg image, no errors are shown but it doesn't orient correctly in img tag in html. when i goto version directory using file browser i can see it orient correctly and when i open image using image viewer it shows correctly. but when put inside a img tag the orientation is wrong. how can i help you to debug this issue?. i am using github master branch of the this gem and ruby vips version is 0.3.9 and i am on ubuntu 14.04

arkmediastudio avatar Aug 24 '14 03:08 arkmediastudio

why we remove orientation metadata in auto_orient in #L69 ?. i also tried without removing it and also setting it to 1 but nothing works

arkmediastudio avatar Aug 24 '14 04:08 arkmediastudio