![]() |
|
Meta data for cached images? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Meta data for cached images? (/thread-8218.html) |
Meta data for cached images? - pju_photo - 2011-02-07 Hello, I wonder whether it is possible for zenphoto to attach meta tags to cached images. Here's my problem: I dug through the source a bit and from all I could tell zenphoto does indeed not add meta data to images it creates? Is this correct or is there something wrong with my setup? Is there any way to write the meta data into the cached images? Would using imagick instead of GD make a difference? Thanks, Meta data for cached images? - acrylian - 2011-02-07 Zenphoto itself is not able to attach meta data, but if you use Imagick instead of GDlib that should preserve the meta data from the full images uploaded. (GD does not support meta data at all). Meta data for cached images? - pju_photo - 2011-02-07 Thanks acrylian, even though that's what I was afraid of - it will cost me some money if I want my host to install imagick for me (and I actually failed at installing it myself even locally). One more question however, you write that GD doesn't support meta data. But it appears PHP supports embedding them - see the manual for iptcembed. Also this stackoverflow question suggests it is possible. I thought about doing it via a plugin, but from what I can tell it would be necessary to have a filter that gets called when an image is cached and I didn't find such a filter? Thanks, Meta data for cached images? - sbillard - 2011-02-07 what GD does not do is preserve metadata when it works with images, so resized images loose the metadata. Using the above I suppose a plugin could imbed the metadata after the images are resized. There is no filter for when an image gets cached. Mostly because Zenphoto is pared down to "bare bones" for this to make the maximum memory possible available for the image processing. Meta data for cached images? - acrylian - 2011-02-07 Did indeed miss that there is actually a function for embeeding. Meta data for cached images? - pju_photo - 2011-02-07 Do you think this is worth submitting a ticket for? If I were to write my own plugin... Does that seem like a good way to go? Anyway, thanks for your help and thanks for zenphoto, I really dig it a lot. Meta data for cached images? - sbillard - 2011-02-07 I think the best way to go is to make a ticket to have Zenphoto replicate the IPTC data from the source image to the copy. That could be done as an option (doing so with the above function requires essentially a file copy of the resized image, so not everyone will want it.) Probably the option is for Lib-GD only since I believe that Lib-Imagick already does this. But our lib-imagick developer will have to comment further on this. Meta data for cached images? - pju_photo - 2011-02-07 Okay, I've submitted a ticket. I'm also interested in whether it already works with imagick though. Meta data for cached images? - kagutsuchi - 2011-02-08 lib-Imagick does already have this functionality in Meta data for cached images? - frankm - 2011-02-22 hi, i gave a try to the dev version of zp to see if the iptc metadata were correctly copied into the cached image file. well for me it didn't work. i am using the GD library. if no iptc data are to be found, the default values (copyright and credit) are not written in the file. i tried to see where the problem is coming from. and it seems to me the image object is not defined so any call like that is what i found. maybe i am doing something not correct. does anyone else has tried to see if the iptc data were properly wrote in the cached files ? (i wanted to post this on the trac ticket but for some reason my login and password do not work anymore. is it a problem to register again with the same email address and same login ?) Meta data for cached images? - sbillard - 2011-02-22 From time to time we clean up the Track user list. Eliminate anyone without an e-mail address to try to cut down on SPAM. Perhaps you did not include your e-mail. Anyway, not sure what you are saying about the image not being defined. Do you get errors? Certainly the code leading into this: Meta data for cached images? - frankm - 2011-02-22 i will register again to use the track. i'll make sure i'll give an email address. now back to caching image with iptc data. i do not get errors. the cached file is created just like before but no iptc data are in it. so i printed few things in a file to see what was going on (i am working on my local server for dev purpose). $imgfile gives /Users/frank/.../.../albumname/imagename.jpg if i print $image->getTitle(), i get nothing but i checked in the database and i do have something in the title field. to go a bit further i replaced
and then i get something when i print $image->getTtile() or anything else (getCredit, getDesc, getCountry...) i hope this makes it a bit clearer. Meta data for cached images? - frankm - 2011-02-22 ooops, i checked that ALBUM_FOLDER_SERVERPATH was defined and it was not. the thing is having the trunk and dev versions on my computers, it get sometimes messed up. i have reinstalled the dev version and guess what it works. i am really sorry. i need to be more organized on my side to avoid this kind of thing in the future. Meta data for cached images? - sbillard - 2011-02-22 No problem. We really do appreciate the testing. Sorry about deleting you Track ID. BTW, the e-mail address helps you with the TRACK as well. You get copies of postings to the ticket then. (One of the reasons we suspect user IDs with no email. who does not want to know about responses to his ticket?) Meta data for cached images? - frankm - 2011-02-22 one thing concerning the UTF-8 settings. it is the field 1:90 that must be set so Meta data for cached images? - sbillard - 2011-02-22 You will have to help me out here. My eyes must be failing, but I see no differnce between what you say the replacement is and what you say must be replaced. Meta data for cached images? - frankm - 2011-02-22 the difference is in the first key of the array. we have Meta data for cached images? - sbillard - 2011-02-22 Thanks. Just could not see it. You are right, it should be 090. |