Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
X GUI Software Linux

Using Enlightenment 17's Epeg API (Part Deux) 29

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."
This discussion has been archived. No new comments can be posted.

Using Enlightenment 17's Epeg API (Part Deux)

Comments Filter:
  • OK, but this offers what over existing thumbnailing functions (KDE, GNOME, ImageMagick) that have the advantage of being much more likely to already be installed on a normal user's system? I thought it might be the caching, but the example code seems to do all the caching itself.

    Incidentally, as long as there is an Enlightenment topic, why not use it?

  • Hello, moron alert (Score:2, Insightful)

    by Nevyn ( 5505 ) *

    directory handling interfaces are all that need to be added, plus a few defines:

    [...]

    #define LEN 1024

    [...]
    the LEN value is the standard string length - this can also be grokked from the limits.h file.
    [...]

    static char path[LEN];

    strcpy(path, dir);
    strcat(path, /);
    strcat(path, file);

    return (path);

    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

    • by LizardKing ( 5245 )

      His reliance on static variables in functions is also yucky. Say hello to code that's never going to be thread safe. The path stuff the parent poster noted is the most breathtaking error though ...

      • Fair point, but if he knows he's not going to use that code in a thread isn't this okay - he can always change it later if he ever rewrites the code to use threads.

        Isn't the use of static variables a good thing if the alternative is to use global variables. If he was using C++ he would probably encapsulate these and have a method using a private attribute, but given that he's using C isn't it okay?
      • Really? I would have chosen him typecasting the return value of closedir, when he's not going to store it (and casting it to void, no less) - I've checked and this doesn't even generate a warning in GCC when compiling with -Wall
    • snprintf(path, n, "%s/%s", dir, file);
      • aaah this explains the gartuitously slow code on todays machines. people thinking snprintf is better than strcpy/strcat.

        snprintf method takes: 0.571 sec for 1,000,000 iterations, strcpy etc. 0.124 sec. you have to think that every time you do something you choose a method 4+ times slower that no wonder today's software is not appreciably faster on machines 100+ times faster that they were 10 years ago.

        code for the test:
        #include
        #include

        int main(int argc, char **argv)
        {
        int i;
    • You'll use any excuse you possibly can to advertise vstr, won't you James? Kindly get over yourself and realize that the point of the article was not to create the perfect program.

      It's an example, for fuck's sake, not a thesis. Move on.
  • 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
  • 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 ex

Technology is dominated by those who manage what they do not understand.

Working...