[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Reading PNG files directly.




On Mar 23, 2011, at 4:44 AM, steve@sjbaker.org wrote:

> 
> I have several situations where I need to read the content of an image
> file in JavaScript (eg, I use a height map for cheesy collision
> detection).
> 
> It looks like all of the examples where people are doing this entails
> loading the image into an off-screen <canvas> - then reading back data
> from the canvas as needed...so that's what I'm doing.
> 
> However, I'm getting odd reports of problems in these subsystems - and I
> suspect that these relate to people with 16 bit frame buffer setups where
> the data is being cut back to 4/4/4/4 precision.
> 
> Is there any way to get around this?  (Aside from packing my data into
> only the 4 MSB's - which would double the size of my height map
> downloads).

This doesn't sound like a WebGL problem. Why not try using XHR with ArrayBuffers? I believe there are at least 2 implementations that support it.

-----
~Chris
cmarrin@apple.com




-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------