NetTalk Central

Author Topic: Uploaded images are being rotated  (Read 5120 times)

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Uploaded images are being rotated
« 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

Djordje Radovanovic

  • Full Member
  • ***
  • Posts: 237
    • View Profile
Re: Uploaded images are being rotated
« Reply #1 on: October 21, 2018, 08:07:54 PM »
Use freeimage library to allow user to adjust image orientation

Regards,
Djole

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Uploaded images are being rotated
« Reply #2 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

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Uploaded images are being rotated
« Reply #3 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

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Uploaded images are being rotated
« Reply #4 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