When libraries attack (not the book kind)

One of the things I'm working on at work involves resizing images. This is not in any way rocket science. It's a well-worn topic in the field of computer science. More broadly speaking, the concept of images, and the loading and saving of them is something of a solved problem for the normal image formats.Until it's not.It turns out that Java in their java.image.io libraries is simply borked.When you can't load and save PNGs that have transparency you're basically useless. Transparency is one of the key features of PNGs so not dealing with that correctly is rather a problem. Same for resizing.When Oracle has an entire page on image resizing and you still have to go to workarounds like progressively resing the image seven times to get any semblance of quality you have failed. There are other imaging systems, programs like ImageMagick, that do this full time and not fail. Similarly, applications like Photoshop have solved this problem handily.But we still have broken-ass libraries that don't work right.Of course, as a programmer, one of the last things that you wind up blaming are things like the compiler or libraries.But when you (or, I suppose, my co-worker) waste the better part of a week or two chasing a silly problem, it tends to get a skosh frustrating.

Previous
Previous

Obviousness

Next
Next

Dependency Injection - Just a bag of global variables