Using Enlightenment 17's Epeg API (Part Deux)
jjrff writes "The Enlightenment
project has turned up some really cool bits lately. here is a nifty article about using their Epeg bits to easily deal with thumbnailing. Note that they also have a great deal of sample code for things like canvasing and even dealing with network delivery."
if anyone actually used it...
Incidentally, as long as there is an Enlightenment topic, why not use it?
What I'm listening to now on Pandora...
Hmm. So there's this limit called PATH_MAX, and instead of using it we'll just type the number in? Not to mention that nothing stops something passing strings bigger than that to your application, PATH_MAX is just the max size you can pass to open() etc. Oh, but it gets better:
Muhahhahaha. It's an article written by someone with no clue, about an API that noone uses ... /. says: +8 insightful.
ustr: Managed string API with ave. 44% overhead over strdup(), for 0-20B
Rasterman is the crazy scientist of desktop programming. He does all kinds of innovative shit, most of which push the boundaries of normal programming, but doesn't give you much other than a view of the possibilities.Stuff he does using the CPU is magic, I've seen enlightenment just rock on a P III 450 - and with just X11 , no OpenGL - no GPU at all.
But, he often doesn't make something you could install on a corporate desktop (I use fluxbox at work). The last E17 install I had has flashing titlebars but Alt+Tab doesn't work. So I hope more and more people learn from E17 and push the envelope for the ordinary user.
Quidquid latine dictum sit, altum videtur
Hold your breath for I shall perform a feat rarely seen on Slashdot... I will actually talk about the subject of the article!
Epeg has one purpose, to scale JPEG images very quickly. One of the primary reasons it was created was because of the freedesktop.org thumbnail spec. The spec requires that the thumbnails be stored as PNG's. While experimenting with this, it was found that converting large JPEG's to PNG's was a relatively slow process because of the color space conversions and IDCT. If the spec was extended to allow JPEG thumbnails, then the conversion process can be JPEG to JPEG.
By keeping the formats the same, you can now do the scaling during the jpeg decode (avoid extra pixel traversals scaling the RGB data after it has been decoded), keep JPEG native color space (no YCbCr->RGB conversion, again traversing the pixel data, twice if you go back to non-RGB image data), and reducing the output written to disk in almost every case (because of the end result being a JPEG rather than a PNG).
Overall, it exists because it didn't seem right to not support the most common image format as a thumbnail when it allows for such large speed increases creating the thumbnails and reduced disk space used for meta-data. Just because disks get larger and CPU speeds increase doesn't mean we shouldn't use them wisely, especially when it's less than a days worth of hacking to do so.
You wrote:
/usr/include/linux/limits.h
So there's this limit called PATH_MAX, and instead of using it we'll just type the number in?
and the article has:
Of course, the directory names are defined, the LEN value is not a standard string length - this can also be grokked from the limits.h file.
And of course you wrote:
% egrep PATH_MAX
Hmmm. Do you think the author of the article knows about limits.h but doesn't want to get bogged down in details?