fasiy / rokon

Automatically exported from code.google.com/p/rokon
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Suggestion: JPG Texture #99

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

new Texture("somefile.jpg");

What is the expected output?

I would like JPG files to be accepted for textures.

What do you see instead?

Nothing. The texture is not displayed.

What version of Rokon are you using?

Trunk.

On which version of Android are you experiencing this?

Android 2.1.

Please provide any additional information below.

Currently, the Texture object seems to only work with certain types of PNG 
files (with RGB and particular colour profiles). Android itself also supports 
JPG drawables, however, as well as indexed PNG, though in ROKON these aren't 
displayed when loaded in Textures.

Original issue reported on code.google.com by necrotic...@gmail.com on 8 Jul 2010 at 1:36

GoogleCodeExporter commented 8 years ago
I'll look into it, won't be ready for 2.0.3

Original comment by rtaylor205@gmail.com on 9 Jul 2010 at 10:35

GoogleCodeExporter commented 8 years ago
I've got around to testing this - and it appears to work fine with JPG with no 
modifications, atleast on my N1

What device does this not work?

Original comment by rtaylor205@gmail.com on 24 Jul 2010 at 3:49

GoogleCodeExporter commented 8 years ago
Perhaps not - it seems like an intermittent fault ... Will look into it now

Original comment by rtaylor205@gmail.com on 24 Jul 2010 at 4:01

GoogleCodeExporter commented 8 years ago
I see it now.

The JPG is being loaded as RGB, and is being copied onto an ARGB texture. So if 
it doesn't crash, it loads skewed. Hmmmmmm

Original comment by rtaylor205@gmail.com on 24 Jul 2010 at 4:23

GoogleCodeExporter commented 8 years ago
Solved, it'll be in the next trunk update.

Solution is to load the textures onto a temporary bitmap, create a new bitmap 
of same dimensions - but ARGB_8888. Copy the temporary to the new, destroy the 
temporary, and use this.

See r359

Original comment by rtaylor205@gmail.com on 24 Jul 2010 at 4:50