While working on several projects that needed to work with images (re-size, crop, scale, etc) I found that GD does not work well with large images but ImageMagick is slower than GD with smaller ones.
So I thought that I could make a script that could work with both (GD and ImageMagick). If I’ve got large image file, my script will use ImageMagick otherwise GD. But everything has its bad side. So what is the bad side of this but slightly growing development time?
Sounds like this could be premature optimization, which increases code complexity, development time, and reduces maintainability.
Collect metrics based on actual usage. Find out:
Another downside is the opportunity cost. If small image resizing represents 5% of your use cases and the resizing step is 10% of that entire workflow, then your time will be better spent optimizing the 95% case where large images are resized or even in the other 90% of the workflow around resizing small images.