Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Image property values confusion
Started by DGuy Oct 22 2009 09:51 AM

- - - - -
5 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

DGuy

[GLOBAL: userInfoPane.html]
DGuy
  • Enthusiast

  • 38 posts
  • Guests

I load up an image that is 512x512 and when I print out its property values I see:
                            x,y: 240, 240
 xMin,yMin,xMax,yMax: 0, 0, 480, 480
               width,height: 480, 480
           xOrigin,yOrigin: 240, 240
xReference,yReference: 0, 0

Shouldn't those "240"s be "255"s, and those "480"s be "512"s ?

Note, the image displays fine.
uid: 1581 topic_id: 189 reply_id: 300189


[TOPIC: post.html]
#2

carlos m. icaza

[GLOBAL: userInfoPane.html]
carlos m. icaza
  • Corona Geek

  • 2,992 posts
  • Alumni

Can you send me the image and code snipplet ?

Carlos
uid: 24 topic_id: 189 reply_id: 212


[TOPIC: post.html]
#3

DGuy

[GLOBAL: userInfoPane.html]
DGuy
  • Enthusiast

  • 38 posts
  • Guests

Hmmmm, ... I just noticed that my 512x512 image is being loaded/displayed as 480x480.

I load up a 256x256 image and the image is loaded/displayed as a 256x256.

So the question becomes:

Why is the 512x512 image being scaled to 480x480?
uid: 1581 topic_id: 189 reply_id: 214


[TOPIC: post.html]
#4

carlos m. icaza

[GLOBAL: userInfoPane.html]
carlos m. icaza
  • Corona Geek

  • 2,992 posts
  • Alumni

We scale to fit the screen. That's why.

Maybe that should not be the default. We should have a parameter that autoscales.

Carlos

uid: 24 topic_id: 189 reply_id: 215


[TOPIC: post.html]
#5

DGuy

[GLOBAL: userInfoPane.html]
DGuy
  • Enthusiast

  • 38 posts
  • Guests

For the sake of completeness, here's the project which loads up the two images and logs out their stats:

http://dl.getdropbox.com/u/105420/Corona%20Samples/512x512_Loaded_As_480x480.zip

Notice, I've placed a magenta line at the top and bottom of the 512x512 image.

As to the fact that Corona is scaling the image to screen size: I totally agree with NOT doing that by default. If the user wants it scaled, let'em scale it themselves.
uid: 1581 topic_id: 189 reply_id: 216


[TOPIC: post.html]
#6

carlos m. icaza

[GLOBAL: userInfoPane.html]
carlos m. icaza
  • Corona Geek

  • 2,992 posts
  • Alumni

We will add this as a bug and feature request an extra parameter to NOT autoscale.

Carlos

ps: nice images.

uid: 24 topic_id: 189 reply_id: 217



[topic_controls]
[/topic_controls]