ShaharMS / Vision

Cross framework, cross platform computer vision for Haxe
MIT License
35 stars 5 forks source link

image: add heaps hxd.Pixels conversions #6

Closed PXshadow closed 2 years ago

PXshadow commented 2 years ago

Only hxd.Pixels is needed as that is the base class that holds texture pixel data and can be converted to and from easily with heaps functions.

ShaharMS commented 2 years ago

Only hxd.Pixels is needed as that is the base class that holds texture pixel data and can be converted to and from easily with heaps functions.

Nice, didn't know that :p I went with BitmapData initially because the ae made sense.

About the thrown error when the pixel data isn't of the format RGBA, I usually change those to an error in an external file. That's something I'll do on my own.

ShaharMS commented 2 years ago

Wait, I think I have a problem - the format used in vision.ds.Image is ARGB. Looks like here you're copying from RGBA. Wouldn't that mess up the channels?

PXshadow commented 2 years ago

Yes indeed, I must have misread the source code, the format should be the one that vision uses internally.