Roxen.git / server / modules / graphics / cimg.pike

version» Context lines:

Roxen.git/server/modules/graphics/cimg.pike:1:   // This is a ChiliMoon module. Copyright © 1999 - 2001, Roxen IS.   //      #include <module.h>   inherit "module";   constant thread_safe=1;      core.ImageCache the_cache;    - constant cvs_version = "$Id: cimg.pike,v 1.59 2004/06/01 22:16:40 _cvs_dirix Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.60 2004/06/04 08:29:21 _cvs_stephen Exp $";   constant module_type = MODULE_TAG;   constant module_name = "Graphics: Image converter";   constant module_doc = "Provides the tag <tt>&lt;cimg&gt;</tt> that can be used "   "to convert images between different image formats.";         mapping tagdocumentation()   {    Stdio.File file=Stdio.File();    if(!file->open(__FILE__,"r")) return 0;
Roxen.git/server/modules/graphics/cimg.pike:310:    {    mapping res = ([ ]);    mapping a = get_my_args( check_args( args ), id );    string data;    mixed err = catch // This code will fail if the image does not exist.    {    res->src=(query_absolute_internal_location(id)+the_cache->store( a,id ));    if(do_ext)    res->src += "." + (a->format || "gif");    data = the_cache->data( a, id , 0 ); -  res["file-size"] = strlen(data); -  res["file-size-kb"] = strlen(data)/1024; +  res["file-size"] = sizeof(data); +  res["file-size-kb"] = sizeof(data)/1024;    res["data"] = data;    res |= the_cache->metadata( a, id, 0 ); // enforce generation    return ({ res });    };   #ifdef DEBUG    report_error("<emit#cimg> error in get_dataset(): %s\n",    describe_backtrace(err));   #endif    RXML.parse_error( "Illegal arguments or image\n" );    return ({});