20
Views
4
Comments
[ImageConverter] startIndex cannot be less than 0
Question
thumb-imageconverter-gif
Web icon
Forge asset by ImageConverter team

When using this extension, I get the following error attempting to iterate and re-size a list of images: 

startIndex is not a parameter to ImageMagick so that is not the problem.

The ImageMagick options are:

"-resize 128x128 -background none -gravity center"

This simple function looks like this:

Any ideas would be very helpful. Thank you in advance.


-Daniel

2024-04-05 15-02-07
João Portela
Staff

Hi Daniel,

The problem might be related with the "For Each" "Start Index" value, check what are you passing to the "For Each". Have you tried to debug the action and look where the error is being thrown?


Regards,

João Portela

2016-06-06 14-19-12
Daniel Cuccia

Hey Joáo,

Tried explicitly setting start index / maximum iterations on the For-Each, same results. While debugging it breaks on the 'Convert' action.

After a little digging, some images in our table did not have filenames, inside of ImageConverter.cs, it required this parameter due to this line:

string args = sourceTempFileName + " " + ssOptions + " " + newTempFileName;

So a few hardcodes ("input.PNG" and "output.PNG" - which did not matter in my scenario) got me past this error and onto the next:

This one seems a little more difficult to debug - any ideas here would be quite helpful.

Thanks again,

-Daniel

2016-06-06 14-19-12
Daniel Cuccia

After adding some logging, 1 image in particular was throwing this error (a corrupt image I can only assume). I ended up manually resetting this offending image (download, re-save/compress, upload) and the process successfully completed. Thanks anyways Joáo.

2024-04-05 15-02-07
João Portela
Staff

Hi Daniel,

Yes, looking at the error, it looks like the convert.exe utility did not like the image you were converting.

let me know if you have any other question.


regards,

João Portela



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.