enum ImageOutputFormat
Defined in:
ext/kemal_gphoto2.crEnum Members
-
JPEG =
0
-
largest in size, yet quickest in terms of encoding speed
-
WEBP =
1
-
~half size of JPEG, 3rd to last in terms of encoding speed
-
AVIF =
2
-
smallest in size, yet slowest in terms of encoding speed
-
PNG =
3
-
worst quality, 2nd to last in terms of encoding speed
-
AUTO =
4
-
placeholder type to use along with
.from_request?
Class Method Summary
-
.from_path?(path : Path) : self | Nil
Returns format based on a file extension from the given path,
nil
otherwise. -
.from_request?(request : HTTP::Request, formats : Enumerable(self)) : self | Nil
Returns first of formats found to be supported by the request,
nil
otherwise. -
.from_request?(request : HTTP::Request, *formats : self) : self | Nil
Returns first of formats found to be supported by the request,
nil
otherwise.
Instance Method Summary
- #auto?
- #avif?
- #extension : String
- #extensions
- #jpeg?
- #mime_type : String
- #png?
-
#to_slice(image : Vips::Image, **options) : Bytes
Returns image in a
self
format. - #webp?
Class Method Detail
Returns format based on a file extension from the given path,
nil
otherwise.
Returns first of formats found to be supported by the request,
nil
otherwise.
Returns first of formats found to be supported by the request,
nil
otherwise.