Rotating Pictures

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Rotating Pictures

4D Tech mailing list
I was surprised that the TRANSFORM PICTURE doesn’t have the ability to rotate a picture. I have the need to programmatically rotate a picture before displaying it on a form based on the EXIF rotation data. I’d like to do this natively, if possible, and it needs to work on both Mac and Windows. Does anyone have any ideas about how to do this?

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236
<[hidden email]>
<www.synergyfarmsolutions.com>


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rotating Pictures

4D Tech mailing list
I should mention that the pictures are JPEGs, if it matters.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236
<[hidden email]>
<www.synergyfarmsolutions.com>


> On Aug 8, 2017, at 5:01 PM, Cannon Smith via 4D_Tech <[hidden email]> wrote:
>
> I was surprised that the TRANSFORM PICTURE doesn’t have the ability to rotate a picture. I have the need to programmatically rotate a picture before displaying it on a form based on the EXIF rotation data. I’d like to do this natively, if possible, and it needs to work on both Mac and Windows. Does anyone have any ideas about how to do this?

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Rotating Pictures

4D Tech mailing list
Hi Cannon,

> Does anyone have any ideas about how to do this?

I think you could use SVG_SET_TRANSFORM_ROTATE:
http://livedoc.4d.com/4Dv15/help/Command/en/page65945.html

The idea would be to create a new SVG canvas and embed the picture on it, then rotate the SVG, then export the SVG back to an image.

This is already done for you and packaged in a component here:
https://github.com/miyako/4d-component-rotate-picture
(Thanks Miyako!)

-Tim





**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Loading...