Closed nseb closed 3 years ago
Hi,
Could you please provide more details on the issue? What do you mean by "open image with Stream"?
To load an image data coming from other APIs you can use the imaging.Decode
function that takes an io.Reader
as its first argument. If you're working with the Google Cloud Storage, you can use the NewReader
method of the ObjectHandle
to get the reader of the object data.
(https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.NewReader)
Hi,
I'm looking for something similar. I would like to stream an image from one bucket, resize it and stream it into another bucket. This article explains exactly what I'm trying to achieve.
I'm not very familiar with Google Cloud Storage. Looking at the docs, you can do a similar processing in Go:
imaging.Decode
function to read the image from the reader.imaging.Resize
to resize the image.imaging.Encode
to write the resized image to the writer.Closing the issue. Feel free to reopen if you have any further questions.
Hi, it's possible to open image with Stream , because I want use framework in google function to load image in google storage with google api.
Best Regards