Cannot get retina to work for iPad

I am using retina images for my app.

It works on my iPhone, I am using newImageRect

but it won’t use the @4x images.

I placed a big X over my images on the retina version to check it.

this is my config.lua:

[lua]

if system.getInfo(“model”) == “iPad” then

    application =

    {

        content =

        {

            --zoom

            width =768,

            height = 1024,

            --scale = “zoomeEven”,

            fps = 30,

            imageSuffix = {

     

                ["@4x"] = 2,

            }

        },

        {

            launchPad = false,

        },

    }

end

[/lua]

This is my image code:

[lua]

    newImage=display.newImageRect

    oefening3=newImage(group,“plaatjes/hoofdmenu/oefening3@2x.png”,(115)*2,(167)*2)

[/lua]

this is the image name oefening3@2x.png for the regular one, oefening3@4x.png for the retina version.

There is no big X on the device or on the simulator.

Why is it not using the Retina images for the iPad?

You need to name the base file “oefening3.png” I think.

When it looks for the @4x version, it simply tacks that on to the filename you’ve specified.

So in this case it will try and find a file called “oefening3@2x@4x.png”, not find it and so use the @2x version.

I actually rarely bother with @2x and @4x files now - I have one retina file with no suffix. It will then scale this image down on iPhone 4/5 and again on 3GS. Sometimes the file doesn’t look good scaled down, but most of the time it looks fine.

Ok that Might work, renaming them @2x@4x.

Will try that, thanks

Tried it and nothing.

changed the line to

oefening4=newImage(group,“plaatjes/hoofdmenu/oefening4.png”,(111)*2,(174)*2) – removed the @2x

got 3 files named oefening4.png, oefening4@2x.png, oefening4.png

nothing changed.

I found it.

I needed this line in there:

scale = “letterbox”

Now it is working.

If you use zoomEven, it won’t work.

You need to name the base file “oefening3.png” I think.

When it looks for the @4x version, it simply tacks that on to the filename you’ve specified.

So in this case it will try and find a file called “oefening3@2x@4x.png”, not find it and so use the @2x version.

I actually rarely bother with @2x and @4x files now - I have one retina file with no suffix. It will then scale this image down on iPhone 4/5 and again on 3GS. Sometimes the file doesn’t look good scaled down, but most of the time it looks fine.

Ok that Might work, renaming them @2x@4x.

Will try that, thanks

Tried it and nothing.

changed the line to

oefening4=newImage(group,“plaatjes/hoofdmenu/oefening4.png”,(111)*2,(174)*2) – removed the @2x

got 3 files named oefening4.png, oefening4@2x.png, oefening4.png

nothing changed.

I found it.

I needed this line in there:

scale = “letterbox”

Now it is working.

If you use zoomEven, it won’t work.