imazen / imageflow

High-performance image manipulation for web servers. Includes imageflow_server, imageflow_tool, and libimageflow
https://docs.imageflow.io/
GNU Affero General Public License v3.0
4.14k stars 140 forks source link

Error: Need Crop, got None #611

Closed caviyacht closed 1 year ago

caviyacht commented 2 years ago

I'm currently evaluating ImageFlow and am trying to port over some of the configuration that we use for ImageResizer. Getting this strange error when using a Branch, but the same error doesn't happen if a Branch isn't used.

I tried doing this using the command string and via the apis. The command string looks like this:

width=128&height=128&trim.threshold=1

image

Error:

InternalError: NodeParamsMismatch: Need Crop, got None at
imageflow_core\src\flow\nodes\clone_crop_fill_expand.rs:416:17
https://github.com/imazen/imageflow/blob/c8951261f8d90ea3a445eaa569538d398e19a25e/imageflow_core/src/flow/nodes/clone_crop_fill_expand.rs#L416
imageflow_core\src\flow\nodes\clone_crop_fill_expand.rs:436:58
https://github.com/imazen/imageflow/blob/c8951261f8d90ea3a445eaa569538d398e19a25e/imageflow_core/src/flow/nodes/clone_crop_fill_expand.rs#L436
imageflow_core\src\flow\execution_engine.rs:294:29
https://github.com/imazen/imageflow/blob/c8951261f8d90ea3a445eaa569538d398e19a25e/imageflow_core/src/flow/execution_engine.rs#L294
imageflow_core\src\context.rs:419:59
https://github.com/imazen/imageflow/blob/c8951261f8d90ea3a445eaa569538d398e19a25e/imageflow_core/src/context.rs#L419
imageflow_core\src\context_methods.rs:50:68
https://github.com/imazen/imageflow/blob/c8951261f8d90ea3a445eaa569538d398e19a25e/imageflow_core/src/context_methods.rs#L50
Active node:
NodeDebugInfo {
    stable_id: 7,
    params: None,
    index: NodeIndex(5),
}
lilith commented 1 year ago

Thank you for reporting this! Fixed in https://github.com/imazen/imageflow/commit/76263befffb3aaed26ba81b7fba4569dfd409cff