Adding Support for Custom File Formats

Hi,
I'd like to add support for some custom file formats (specifically TGA, TIFF, and BMP) via on the fly conversion to PNG.

I've started to poke around in the code but any pointers to relevant files and classes would be helpful. I will use ImageMagik to either cache the files as accessed or serve them on the fly Thanks in advance for any help

Comments

  • Custom file formats are possible with the nightly build. Look at the plugin `class-textobject.php` for the rudimentary implementation. Of course, text files are fairly simple, so you may have do do more with the class for other formats.
  • Thanks for the pointer. I'll post back here with any questions.
  • I want to add support for on-the-fly thumbnails as well (with the same naming conventions and cache location used by zpcore). While stepping through executing code, I don't see a specific line of code where the thumbnails are actually created.

    I followed printImageThumb through the return of getThumb,
    zp-core/class-image.php.Image->getThumb : lineno 707
    zp-core/template-functions.php.getImageThumb : lineno 2319
    zp-core/template-functions.php.printImageThumb : lineno 2359

    The line zp-core/template-functions.php.printImageThumb : lineno 2371 seems to genenerate the file, but stepping into the function calls there, I don't see where.

    Any pointers?
  • acrylian Administrator, Developer
    The actual thumb generation is in line 2336 to 2360. You can access the image processor also directly with this:
    `/zp-core/i.php?a=&i=&s` etc. Full set of options on top of the file i.php. Of course these are for the GDlib.
  • Thanks acrylian.

    I'm trying to get MagickWand installed and its not easy (CentOS or Windows). I can see why this hasn't been done already ^_^

    I might just end up hacking together a system command... for the mean time.
Sign In or Register to comment.