Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Question about Letterbox — Gideros Forum

Question about Letterbox

LearnerLearner Member
edited May 2013 in General questions
Hi Gideros users,

I am evaluating Gideros for a interactive book project I have to develop. The idea is to run the book in most Android and IOS devices. The first question I have (I have many) is: when letterbox is used it is correct that Gilderos places the images, in my case background, aligned to top-right sides?

Thanks in advance for your answers

Regards

Learner

Comments

  • ar2rsawseenar2rsawseen Maintainer
    @Learner, no letterbox is centered and leaves blank spaces in case of improper scale ratio, but you can fill that with images exceeding the size of logical dimensions.

    Here is a great post about it:
    http://www.giderosmobile.com/forum/discussion/comment/13692#Comment_13692
  • LearnerLearner Member
    Thanks ar2rsawseen for your fast response. Well also I assumed the image should be centered. Definitely I am doing something wrong. This is what I have:
    Scale Mode: Letterbox
    Logical Dimensions: 320x480
    Image size: 360x480

    Results for different HW sizes:
    320x480: No blanks bars
    480x800: Top and bottom white Bars
    540x960: Top and bottom white Bars
    768x1024: Left white Bar

    I recommend the “Understanding scaling and resolution on different devices” post becomes a tutorial. There are useful information there but difficult to follow. The other SDK has a very nice tutorial about this subject and it would be great to have one in Gideros, specially for beginners like me.

    Regards
  • loucsamloucsam Member
    I agree with Learner, and this is becoming an issue with my development. A clear, concise tutorial is really needed, and would be very welcome. :D I'm going to have to do a fair bit of refactoring because of this issue I suspect.

    Dislikes: Yan

    +1 -1 (+0 / -1 )Share on Facebook
  • LearnerLearner Member
    Hi,

    I am still having issues with letterbox and understanding scaling. I have these results for different HW sizes and a logical size of 320x480:

    320x480: scale factor 1 (480/480)
    768x1024: scale factor 2.13 (1024/480 = 2.13)
    1536x2048: scale factor 4.26 (2048/480 = 4.26)
    320x 568: scale factor 1 (568/480 = 1.183) Gideros takes width instead of height for scale factor
    540x960: scale factor 1.68 (960/480= 2) Gideros takes width instead of height for scale factor
    768x1366: scale factor 2.4 (1366/480= 2.84) Gideros takes width instead of height for scale factor

    Why in some cases Gideros uses height and another width to calculate scale factor? Why in the case of 540x960, Gideros does not use 2 as scale factor and prefers a fraction?

    Also I am getting problems with 600x800, 1536x2048, 768x1024 and 240x320. I got a left white bar for those HW sizes. Is it correct?

    Thanks in advance
  • LearnerLearner Member
    Hi Gideros users. I really need to know if this behavior related to scalling is a bug. This is crucial for me because I will develop my project for multiple devices. Thanks in advance.
  • @Learner
    device width / Logical Dimension setting (in project properties) 'width' = scale factor

    If the scale factor on a particular device is greater than the number you specify for the Image Scales (in project properties), Gideros will use those assets.

    It is always using width (not height in scale factor). And remember to close and reopen Gideros player (Or maybe Gideros studio) when you change the config.
    Coming soon
  • ar2rsawseenar2rsawseen Maintainer
    edited May 2013
    Hello ;)

    how do you determine the scale factor you show in your calculation?

    Just couple of things to note, to make sure you do the tests correctly:

    Firstly the logical dimensions you set in the project, you need to set them in correct order, no matter what orientation you use, first one is always the width (the smallest value), and second is always the height (the biggest value) no matter what orientation you actually use.

    Secondly about bars on only one side. So if you have letterbox scaling it should always scale to center. If you use 320x480 as logical dimensions and you use the image thats is 320x480 dimension, you should see white bars on both sides if selected resolution does not fit the same aspect ratio. The reason why you see only one white bar, I assume, would be, because the image you use is larger then 320x480 dimensions, and you position your image at 0,0 coordinates, thus you have left bar white (because it is smaller than 0,0 coordinates), but you don't have white bars on the right, because image is larger than 320x480 dimension and fills that space up.

    To fix it, you either can put image in the center of the screen and use 0.5 anchorpoint, or use absolute positioning to fill in the white bars:

    http://appcodingeasy.com/Gideros-Mobile/Ignore-Automatic-Screen-Scaling-when-positioning-objects

    Hope that helps ;)

Sign In or Register to comment.