You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of a question than an issue: I wonder how hard it would be to make MagickImage comply with the image.Image interface in the image stdlib package?
The use case would be that I can use magick along with other image-handling packages. For example I just wrote an image resizing server using Resize and I would like to replace the image-handling parts of my code with magick so I can benchmark the two.
Looking at the image.Image interface definition it looks like you'd only have to implement the following:
typeImageinterface {
// ColorModel returns the Image's color model.ColorModel() color.Model// Bounds returns the domain for which At can return non-zero color.// The bounds do not necessarily contain the point (0, 0).Bounds() Rectangle// At returns the color of the pixel at (x, y).// At(Bounds().Min.X, Bounds().Min.Y) returns the upper-left pixel of the grid.// At(Bounds().Max.X-1, Bounds().Max.Y-1) returns the lower-right one.At(x, yint) color.Color
}
The text was updated successfully, but these errors were encountered:
This is more of a question than an issue: I wonder how hard it would be to make
MagickImage
comply with theimage.Image
interface in the image stdlib package?The use case would be that I can use magick along with other image-handling packages. For example I just wrote an image resizing server using Resize and I would like to replace the image-handling parts of my code with magick so I can benchmark the two.
Looking at the image.Image interface definition it looks like you'd only have to implement the following:
The text was updated successfully, but these errors were encountered: