Seam carving in bad code
So Carmo wrote about some seam carving code written in Qt by Gabe Rudy, and how it wouldn’t compile in XCode. What I’m wondering is, however, how it ever compiled in anything. See, for some reason Gabe decided to use Yet Another Image Library (like there aren’t enough half-assed image libraries out there) that was written in C in his C++ code. Without declaring it extern C. So Gabe’s code would be looking for the wonderful function signature L__Z10createMaskii$stub instead of _createMask.
I fixed ‘em up with some #ifdef __cplusplus. Here’s the source and binaries for your enjoyment. Oh, but before you joyfully go download it, be warned: the resizing is not in real time.