image->convert
Converts image format.
Target
Signature
1image->convert(ext::string, -quality::integer= ?)Converts image format.
image->convert is called with member syntax on a receiver value. image->convert works with structured document or media data. Keep parsing, transformation, and output steps separate enough that each step can be checked on its own.
Parameters
ext- Required value of type
string. Supplyextpositionally unless the signature shows a keyword form. -quality- Optional value of type
integer. Supply-qualityby keyword, keeping the leading hyphen in the call.
Examples
Basic call
1image('/tmp/photo.jpg')->convert('png')The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.