Possible to convert big-to-little endian floats in a CIFilter?

Hi,


I have a program that reads float image data from files that are recorded in a big-endian format. (The data are literally an array of float values, not RGB or similar.) I use a library that reads the values into memory and converts them from big endian to little, then I create a CGImage from this data. Some of the data files can grow to be quite large, e.g. hundreds of MB, which when converted to an image can consume a lot of memory.


I've considered exploring memory mapping to avoid having a full copy of the data in RAM that I pass to various CIFilters, but the data is the wrong endian-ness. I am wondering if it's possible to create a CIFilter that will convert the values to little-endian so I can use memory mapping. I am hoping that the performance will still be ok on at least SSD drives.


Thanks,

Demitri

Possible to convert big-to-little endian floats in a CIFilter?
 
 
Q