source : Image.Internal.ImageData.Image -> Source
Get image type
Possible image decoded type
map : (Basics.Int -> Basics.Int) -> Image.Internal.ImageData.Image -> Image.Internal.ImageData.Image
Apply a function on every pixel in an image.
get : Basics.Int -> Basics.Int -> Basics.Int -> Basics.Int -> Image.Internal.ImageData.Image -> Image.Internal.ImageData.Image
Returns an Image
representing the underlying pixel data for a specified portion of the Image
.
region =
Image.get sx sy sw sh image
sx
The x-axis coordinate of the top-left corner of the rectangle from which the Image
will be extracted.sy
The y-axis coordinate of the top-left corner of the rectangle from which the Image
will be extracted.sw
The width of the rectangle from which the Image
will be extracted. Positive values are to the right, and negative to the left.sh
The height of the rectangle from which the Image
will be extracted. Positive values are down, and negative are up.image
The source image to select pixels from.region
An Image
containing the image data for the rectangle of the image
specified.
The coordinates of the rectangle's top-left corner are (sx
, sy
), while the coordinates of the bottom corner are (sx
+ sw
, sy
+ sh
).put : Basics.Int -> Basics.Int -> Image.Internal.ImageData.Image -> Image.Internal.ImageData.Image -> Image.Internal.ImageData.Image
Paints data from the given Image
onto the other Image
.
newImage =
Image.put dx dy imageFrom imageTo
imageData
An Image
containing the array of pixel values.dx
Horizontal position (x coordinate) at which to place the image data in the destination Image
.dy
Vertical position (y coordinate) at which to place the image data in the destination Image
.eval : Image.Internal.ImageData.Image -> Image.Internal.ImageData.Image
When decoding images they are decoded in lazy way (real decoding is postponed until data is needed) this function evaluates postponed decode, useful if you need to encode multiple images from same source.
mirror : Basics.Bool -> Basics.Bool -> Image.Internal.ImageData.Image -> Image.Internal.ImageData.Image
Mirror image horizontally or/and vertically
newImage =
Image.mirror x y image
toPng32 : Image.Internal.ImageData.Image -> Bytes
Encode image into True color with alpha PNG image
toBmp24 : Image.Internal.ImageData.Image -> Bytes
Encode image into BMP24
toBmp32 : Image.Internal.ImageData.Image -> Bytes
Encode image into BMP32
Note: Using BMP 32bit is discouraged due to lack of proper support across browsers
toGIF89a : Image.Internal.ImageData.Image -> Bytes
Encode image into GIF89a
Note: