ImageMalformed Error
DanPatten opened this issue · 3 comments
I am getting the following error on some images, are these images not readable by imageflow?
Imageflow.Bindings.ImageflowException: ImageMalformed: Error 9: Wrong input color space on transform (ObjectCreationError) at imageflow_core\src\codecs\color_transform_cache.rs:126:197 https://github.com/imazen/imageflow/blob/22a2bf99f278d4dd7b8da65ee1604b5f84eb1d50/imageflow_core/src/codecs/color_transform_cache.rs#L126 imageflow_core\src\codecs\color_transform_cache.rs:190:148 https://github.com/imazen/imageflow/blob/22a2bf99f278d4dd7b8da65ee1604b5f84eb1d50/imageflow_core/src/codecs/color_transform_cache.rs#L190 imageflow_core\src\codecs\libpng_decoder.rs:287:39 https://github.com/imazen/imageflow/blob/22a2bf99f278d4dd7b8da65ee1604b5f84eb1d50/imageflow_core/src/codecs/libpng_decoder.rs#L287 imageflow_core\src\flow\nodes\codecs_and_pointer.rs:222:65 https://github.com/imazen/imageflow/blob/22a2bf99f278d4dd7b8da65ee1604b5f84eb1d50/imageflow_core/src/flow/nodes/codecs_and_pointer.rs#L222 imageflow_core\src\flow\execution_engine.rs:477:114 https://github.com/imazen/imageflow/blob/22a2bf99f278d4dd7b8da65ee1604b5f84eb1d50/imageflow_core/src/flow/execution_engine.rs#L477 imageflow_core\src\context.rs:419:59 https://github.com/imazen/imageflow/blob/22a2bf99f278d4dd7b8da65ee1604b5f84eb1d50/imageflow_core/src/context.rs#L419 imageflow_core\src\context_methods.rs:50:68 https://github.com/imazen/imageflow/blob/22a2bf99f278d4dd7b8da65ee1604b5f84eb1d50/imageflow_core/src/context_methods.rs#L50 Active node: NodeDebugInfo { stable_id: 2, params: Json( Decode { io_id: 0, commands: None, }, ), index: NodeIndex(1), }
Here is the zipped image.
Here is the code I am using:
height=120, width=224,fitMode=null
using (var b = new ImageJob())
{
await b.BuildCommandString(
new StreamSource(streamIn, false),
new StreamDestination(streamOut, false),
$"width={width}&height={height}&mode={fitMode}")
.Finish().InProcessAsync();
}
return streamOut;
Have you tried adding &ignore_icc_errors=true