ios - Why [UIImage imageWithData:] supports PVRTC format? -


i find out in ios 8.3 sdk (i didn't test other versions), can use [uiimage imagewithdata:] load pvrtc format directly?

it isn't supposed that, right? can't find documentation or discussion it, don't know if can rely on it...

but work in both simulators , real devices.

here codes of test, test project doesn't include opengles.framework.

nsdata *data = the_content_of_a_pvr_file; nsstring *tempdir = nstemporarydirectory(); [data writetofile:[tempdir stringbyappendingpathcomponent:@"temp.pvr"] atomically:yes]; uiimage *tempimage = [uiimage imagewithdata:data]; [uiimagepngrepresentation(tempimage) writetofile:[tempdir stringbyappendingpathcomponent:@"temp.png"] atomically:yes]; 

the 2 saved files shared here: http://d.pr/f/17ugq

you can check pvr file in hex editor, coresponds specifications of pvrtc format version 2, pixel format in pvrtc4.

any idea?


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -