Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] [BUG] (portrait) image auto-rotated when loaded via ChooseRawFile() (and more)

Author
Message
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 4th Jan 2019 08:16 Edited at: 4th Jan 2019 08:37
2018.12.12 - Loading images using ChooseRawFile(), "Portrait"-oriented images (where height > width) are automatically rotated 90 degs:

same occurs using LoadSprite(Choose$)

also, image (silently) not copied to media folder as expected when not using 2nd/optional parameter. ie, same as ,1 behavior.

and, using ,0 causes "could not find image" crash while depicting correct full path. (Help file doesn't offer that ,0 is valid, anyway, so...was worth a shot)

i've seen the other issues with ChooseRawFile() found via search but haven't seen this one yet.

ADD: performs correctly for relatively smaller images (960x1280) but i get the rotation @ 3000x4000 (including when using LoadImageResized()).

The author of this post has marked a post as an answer.

Go to answer

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 4th Jan 2019 15:06
This post has been marked by the post author as the answer.
Just tested on Windows with a 3200x2368 image and it works here. Note that the image may actually be rotated on disk with a header parameter saying in which orientation the image should be displayed. AppGameKit only reads the pixel data so it will show the image as it is stored on the disk. The image will be copied to the write folder, which on Windows is located at C:\Users\Username\AppData\Local\AGKApps\AppName

The default value for the second parameter is 0, which copies the file. When the second parameter is set to 1 the command will return the full path to the image, so you will need to use the "raw:" prefix to access it, e.g. ThisImage = LoadImage("raw:"+Choose$)
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 4th Jan 2019 17:57
thanks for looking at it. and, now, i can't replicate the issue... weird.

Login to post a reply

Server time is: 2024-04-24 05:21:49
Your offset time is: 2024-04-24 05:21:49