Member
Member
swidnikk   2008-10-19, 16:16
#1

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

Member
Member
sbillard   2008-10-19, 18:43
#2

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.

Member
Member
swidnikk   2008-10-22, 15:46
#3

Thanks for the pointer. I'll post back here with any questions.

Member
Member
swidnikk   2008-10-27, 10:50
#4

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?

Administrator
Administrator
acrylian   2008-10-27, 11:03
#5

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.

Member
Member
swidnikk   2008-10-27, 16:29
#6

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.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.