Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-03-2018, 02:33 PM   #1
AlanHK
Evangelist
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 414
Karma: 1002
Join Date: Apr 2014
Device: PW-3, Android phone
SVG to rotate image

I have no real understanding of SVG, I use plugins to generate SVG wrappers for images and then place it.

One thing I often do with landscape mode images (e.g., maps) is to to rotate them 90% so they can be larger on the page -- I assume it's being read on a Kindle or other tablet so you can just turn it in your hand.

It''s easy to rotate the image losslessly in Irfanview, but I wonder if I can import the image in normal orientation and use SVG to rotate it? Would make managing or revising the image easier.
AlanHK is offline   Reply With Quote
Old 09-03-2018, 02:42 PM   #2
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 4,444
Karma: 9872505
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, Kobo AuraHD/Aura6"/H2O/GloHD/KA1/ClaraHD
Quote:
Originally Posted by AlanHK View Post
... but I wonder if I can import the image in normal orientation and use SVG to rotate it? Would make managing or revising the image easier.
I don't know about using SVG to do the rotation but the calibre Editor has a 'rotate image' tool. Clicking it rotates it 90-degrees at a time.
jackie_w is offline   Reply With Quote
Old 09-03-2018, 03:17 PM   #3
AlanHK
Evangelist
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 414
Karma: 1002
Join Date: Apr 2014
Device: PW-3, Android phone
Quote:
Originally Posted by jackie_w View Post
I don't know about using SVG to do the rotation but the calibre Editor has a 'rotate image' tool. Clicking it rotates it 90-degrees at a time.
I guess that changes the image file. I know how to do that; I want code to display rotated.
AlanHK is offline   Reply With Quote
Old 09-03-2018, 10:45 PM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 1,665
Karma: 11766398
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 6/5/iPad 1,2 & Air/Surface Pro/Kindle PW
You could mess around with the TRANSFORM options, but I don't think there will be much, if any, support for that...especially with ePub2.

Check out this thread for a discussion on why its not even worth it with a reflowable epub and devices that autorotate - and zoom into the image with a tap.

Last edited by Turtle91; 09-03-2018 at 10:53 PM.
Turtle91 is offline   Reply With Quote
Old 09-04-2018, 12:39 PM   #5
AlanHK
Evangelist
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 414
Karma: 1002
Join Date: Apr 2014
Device: PW-3, Android phone
Quote:
Originally Posted by Turtle91 View Post
Check out this thread for a discussion on why its not even worth it with a reflowable epub and devices that autorotate - and zoom into the image with a tap.
Matter of opinion. Anyway, there are devices that don't autrotate (like Kindle) or you can turn it off. I usually do.


Quote:
Originally Posted by Turtle91 View Post
You could mess around with the TRANSFORM options, but I don't think there will be much, if any, support for that...especially with ePub2.
Which is why my question is about how to do it in SVG. But it seem not a lot of SVG coders here.

Last edited by AlanHK; 09-04-2018 at 12:49 PM.
AlanHK is offline   Reply With Quote
Old 09-04-2018, 03:39 PM   #6
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 4,444
Karma: 9872505
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, Kobo AuraHD/Aura6"/H2O/GloHD/KA1/ClaraHD
Quote:
Originally Posted by AlanHK View Post
Which is why my question is about how to do it in SVG. But it seem not a lot of SVG coders here.
I seem to remember that MR member RbnJrg knows a lot about SVG and epub. If he doesn't see this thread it might be worth PM-ing him. He's usually very helpful about sharing info.
jackie_w is offline   Reply With Quote
Old 09-04-2018, 07:28 PM   #7
signum
Zealot
signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.signum calls his or her ebook reader Vera.
 
Posts: 118
Karma: 64428
Join Date: Aug 2011
Device: none
Quote:
Originally Posted by AlanHK View Post
But it seem not a lot of SVG coders here.

I've fooled around with some SVG transforms before. The short answer to your question is Yes, you can rotate images using just SVG. You can also scale, skew, translate and possibly reflect the image to somewhere else in the viewport. The image could be a jpg, png, geometric primitive such as rect, text, most anything. Look up a reputable tutorial on SVG, especially transforms, and see what you can come up with.


A couple things you must not forget: 1) The viewport defines a virtual "canvas" with left-hand coordinates (meaning simply that the origin is in the UPPER left corner, instead of the BOTTOM left corner), which often corresponds to pixels, but it doesn't have to. All transforms are performed on this canvas. Actual screen pixels aren't assigned until SVG finishes its job. 2) rotations are done about the (0,0) point of the canvas. You will probably want to translate the center of you image to (0,0), do the rotation, and then back-translate it to where it came from.
signum is offline   Reply With Quote
Old 09-05-2018, 06:05 PM   #8
RbnJrg
Guru
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 891
Karma: 3273787
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by jackie_w View Post
I seem to remember that MR member RbnJrg knows a lot about SVG and epub. If he doesn't see this thread it might be worth PM-ing him. He's usually very helpful about sharing info.
Thank you very much kind lady. The OP could read with advantage the items in the following site:

http://tutorials.jenkov.com/svg/index.html

and regarding "transformations", this page:

http://tutorials.jenkov.com/svg/svg-transformation.html

But the best way to proceed while one is not acustomed to work with SVG images, is to download Inkscape and play with it.
RbnJrg is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
svg image on top of a background png image roger64 ePub 25 04-24-2015 11:00 AM
Display of a png image linked to a svg image roger64 Editor 6 03-13-2015 06:21 AM
Aura HD CBZ/CBR how to rotate image comics? Start Kobo Reader 4 08-22-2014 07:17 PM
Rotate every other image from a folder DSpider Workshop 5 05-31-2012 03:00 PM
Image zoom / rotate with PocketBook 360 ? spangen PocketBook 0 06-10-2010 06:34 AM


All times are GMT -4. The time now is 03:10 PM.


MobileRead.com is a privately owned, operated and funded community.