Are there any plans for Corona to support loading/saving images > GPU max texture size?

Hi all,

I have built a photo decorating app in Corona that can edit images either captured directly from the device camera or loaded in from the device library. I use a display group to overlay images on top of the photo and save it back out to a file to the user’s photo library.

The Problem

However, loading in an image has it’s resolution limited by the GPU MAX TEXTURE SIZE (if the image is larger corona automatically downsizes it when the app loads it) and saving an image is limited to the device’s screen resolution.

The Question

Does Corona have any plans to provide an API for loading and saving images larger than the GPU MAX TEXTURE SIZE and the device’s screen resolution? I am trying to decide whether I need to rewrite the app in native Java for android to get the functionality I need.

The API

Presumably, the API would work something like this behind the scenes:

Loading:

If the image being loaded is larger than the max texture size, break it apart into chunks that are smaller than the max texture size and load them into different textures. These textures would be knitted together behind the scenes to display the single image on screen.

Saving:

The image consisting of multiple textures behind the scene would be saved out to a graphics file format (png, jpg) with all the textures properly knitted together to create the large image.

Altering:

The API would work with display groups so that large images could be saved with other graphics overlayed on top of them.

The Goal:

Load, alter, and save images that are larger than the GPU max texture size and device resolution. Alter the original pixels of the image and overlay other graphics at the original resolution of the image.

Extras

For a description of how this can be accomplished in android, see the solution to this question:

http://stackoverflow.com/questions/15655713/dealing-with-androids-texture-size-limit

I’m checking with the engineers.

Rob

Hi Rob,

Any word back from the developers? I am anxiously awaiting your response :slight_smile:

Thanks in advance!

We cannot create textures greater than MaxTextureSize. We are working on some APIs to let you create textures on the fly. You would still need to manage the splitting and stitching of the images and such on the native side. See:

https://docs.coronalabs.com/api/library/graphics/newTexture.html

I’m checking with the engineers.

Rob

Hi Rob,

Any word back from the developers? I am anxiously awaiting your response :slight_smile:

Thanks in advance!

We cannot create textures greater than MaxTextureSize. We are working on some APIs to let you create textures on the fly. You would still need to manage the splitting and stitching of the images and such on the native side. See:

https://docs.coronalabs.com/api/library/graphics/newTexture.html