disintegration / imaging

Imaging is a simple image processing package for Go
MIT License
5.22k stars 433 forks source link

Stream #122

Closed nseb closed 3 years ago

nseb commented 4 years ago

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

disintegration commented 4 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)

jz222 commented 4 years ago

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.

disintegration commented 4 years ago

I'm not very familiar with Google Cloud Storage. Looking at the docs, you can do a similar processing in Go:

disintegration commented 3 years ago

Closing the issue. Feel free to reopen if you have any further questions.