Anyone have a RAW loader?
BlitzMax Forums/BlitzMax Programming/Anyone have a RAW loader?
| ||
LoadPixmapRAW()? For that matter why isn't there a PF_I16 pixel format? |
| ||
Um, open the file, read the data into a pixmap. |
| ||
LoadPixmapRAW()? Keep in mind that there are many different .raw formats -- they vary between manufacturers and camera models. (Photoshop regularly updates its RAW plugin to support the new flavors) |
| ||
I finally figured out raw is just binary data, unless you have some proprietary camera format, which defeats the purpose of a no-BS data format. Here's a convenient function with safeguards: Function LoadRaw:Int(url:Object,data:Byte Ptr,width,height,bpp) Local stream:TStream Local size stream=ReadStream(url) If Not stream Return size=width*height*bpp If size<>stream.size() Return stream.readbytes data,size Return 1 EndFunction |
| ||
You could take dcraw and write a BlitzMax wrapper for it. ;-) http://cybercom.net/~dcoffin/dcraw/ |