How to load image asset as binary file

Hello there,

everything is in the title…
I actually do not see where the asset type is detected in lime, but I’m wondering if there’s a way to avoid the automatic detection and force image to be stored as Bytes.

Thanks

Ok I found how to do that, in lime/project/Asset.hx

now the question is for me, do you agree that it would be a good thing to add (especially since lime treats image as bytes), and how to integrate that option smoothly ?

@singmajesty ?

++

Not sure exactly what you want to do but you can overwrite the automatic type detection with this:
<assets path="images" include="*" type="binary" />

See the asset tag here http://www.openfl.org/documentation/projects/project-files/xml-format/

Hi Ibilon,

that is exactly what I ended to do after a closer look at the source code…
I totally miss that part on the documentation…

Thank you :slight_smile:

You should be able to Assets.getBytes images without changing the type :slight_smile: