-
As far I can tell, to create a new encoded image or depth image, I would need to provide a width and height. My application only receives the encoded byte stream + type ("png", "tiff", etc) but not the height or width. The height and width information are already encoded in the given byte stream. This actually create a bit of problem when I am trying to decode the memory stream. I end up having to read it first to get the height and width and then convert it to a Psi format. Here's an example of how I work around it.
I'm guessing the height and width requirements exist to help with the I think I'm looking for an easier way to:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, you are correct that this is a current limitation of |
Beta Was this translation helpful? Give feedback.
Yes, you are correct that this is a current limitation of
EncodedImage
. The image dimensions need to be provided in theEncodedImage
, and there currently isn’t a way to create one from just a memory stream. In the next release we'll be adding aSetBuffer
method to provide the ability to set the underlying bytes, but you would still need to know the image dimensions up front when creating theEncodedImage
. Unfortunately if your application doesn’t know the dimensions of the encoded byte streams it receives, then your current workaround is your best bet for now.