What's the most efficient way to create a thumbnail from an arbitrary web image in iPhone?
Gave me "CGBitmapContextCreate: unsupported colorspace." on first try. After checking the comments it seems that the scope of that library is very limited. I can't assume much of the images (other than they are PNG or JPEG).
hgpc
2010-06-13 00:28:43
That is caused by the API being very fussy about the relationship between the bit resolution, the alpha and the colorspace. You have to check that the image has the correct configuration and then create a new, properly formatted image if it does not. That is really unavoidable. I don't think anyone has done a generic resize that works with everything.
TechZen
2010-06-13 19:38:14
How do I check if it has the right configuration and then create a properly formatted image if it does not?
hgpc
2010-06-14 04:18:18
A:
The only way that I've found so far that works on any images is to show it in an ImageView with the right size, and then create a bitmap from that view.
Far from efficient, though.
hgpc
2010-06-25 16:39:15