How does one specify a format for an ImageMorph based on a binary stream
I am trying to do some simple image manipulation. Basically, I want to subtract one image from another, to see what's left. As an experiment, did aStream := ReadStream on: image1 imageExport. newImageMorph := ImageMorph fromStream:aStream. Unfortunately, this fails because there is no subclass to handle the binary stream. I couldn't find a way to specify what format the image was in. Does anyone know how to do this? Cheers Andy
I am not sure to understand you, but should you not use: ImageReadWriter class>>formFromStream: Then use Form or BitBlt protocols for your bits manipulations? Hilaire Le 14/08/2016 à 10:02, Andy Burnett a écrit :
I am trying to do some simple image manipulation. Basically, I want to subtract one image from another, to see what's left.
As an experiment, did
aStream := ReadStream on: image1 imageExport. newImageMorph := ImageMorph fromStream:aStream.
Unfortunately, this fails because there is no subclass to handle the binary stream. I couldn't find a way to specify what format the image was in. Does anyone know how to do this?
Cheers Andy
-- Dr. Geo http://drgeo.eu
ImageReadWriter formFromStream: 'http://pharo.org/files/pharo.png' asUrl retrieveContents readStream (ImageReadWriter formFromStream: 'http://pharo.org/files/pharo.png' asUrl retrieveContents readStream) asMorph openInWindow
On 14 Aug 2016, at 04:51, Hilaire <hilaire@drgeo.eu> wrote:
I am not sure to understand you, but should you not use:
ImageReadWriter class>>formFromStream:
Then use Form or BitBlt protocols for your bits manipulations?
Hilaire
Le 14/08/2016 à 10:02, Andy Burnett a écrit :
I am trying to do some simple image manipulation. Basically, I want to subtract one image from another, to see what's left.
As an experiment, did
aStream := ReadStream on: image1 imageExport. newImageMorph := ImageMorph fromStream:aStream.
Unfortunately, this fails because there is no subclass to handle the binary stream. I couldn't find a way to specify what format the image was in. Does anyone know how to do this?
Cheers Andy
-- Dr. Geo http://drgeo.eu
participants (3)
-
Andy Burnett -
Hilaire -
Sven Van Caekenberghe