NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: peterH on October 21, 2018, 08:45:37 AM

Title: Uploaded images are being rotated
Post by: peterH on October 21, 2018, 08:45:37 AM
I wonder if anyone has experienced this - and know how to fix it :-)

When users upload pictures from their phones or pc's then most of the time the pics are rotated by -90 degrees when displayed on a NT form.
However, it's not a NT specific problem. It also happens if I include the image on a very simple HTML page but it does NOT happen when I open the picture in Windows File Explorer.

Peter
Title: Re: Uploaded images are being rotated
Post by: Djordje Radovanovic on October 21, 2018, 08:07:54 PM
Use freeimage library to allow user to adjust image orientation

Regards,
Djole
Title: Re: Uploaded images are being rotated
Post by: peterH on October 21, 2018, 10:26:39 PM
Hi Djole,

That would be nice - but I need it to happen automatically if at all possible.
BTW, I already use FreeImage to adjust the size of the images before I save them away.

Thanks
Peter
Title: Re: Uploaded images are being rotated
Post by: bshields on October 22, 2018, 03:44:58 AM
Hi,

I've only used ClarionFreeImage a bit (mostly use ImageEx4, but have been replacing it with ClarionFreeImage).

At a rough guess:

ThumbImage FreeImageClass
  Code
  If ThumbImage.iImage.Load('ImageFile.jpg')
    ThumbImage.iImage.Rotate(90)
    ThumbImage.iImage.SaveAs('ImageFile90.jpg')
  End

Regards
Bill
Title: Re: Uploaded images are being rotated
Post by: peterH on October 22, 2018, 02:09:39 PM
Hi Bill,

Pretty good for a 'rough guess'  :)

I had a few more questions and Larry Sand came to my rescue.

Thanks
Peter