![]() |
|
Bicubic Sharper resampling - 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: Bicubic Sharper resampling (/thread-466.html) |
Bicubic Sharper resampling - astorm - 2006-04-25 In Photoshop, we usually use "Bicubic Sharper" resample to reduce image size. Is it possible to implement some sort of sharpening for the resized images? Bicubic Sharper resampling - aitf311 - 2006-04-25 That would definately make the resized images look nicer but it seems to me that something like sharpening would be very resource hungry....granted I dont know anything about php. Bicubic Sharper resampling - Chilifrei64 - 2006-04-25 From what I just read.. yes.. it is very resource hungry. With that being said.. here is a script that someone created that will do that.. not sure how easy that is to integrate.. Obviously it would be a "hack" of zenphoto to impliment it unless tris decided he wants it.. but here it is http://vikjavev.no/hovudsida/umtestside.php. Bicubic Sharper resampling - astorm - 2006-04-25 Good find Chilifrei64! I was wondering if there are alternative solutions other than GD (ImageMagick, NetPBM, etc) that can do this with less resource usage. Of course, we'd need to figure out how integrate it into ZP =) Bicubic Sharper resampling - trisweb - 2006-04-25 astorm, I always though adding ImageMagick support would be a cinch, mainly because all the image processing is contained nicely in i.php, and you can just do a couple switches and use ImageMagick's functions instead of GD. I've always wanted to see if there's a speed difference, and the extra compatibility is good, so I imagine it will happen someday. I probably won't add this filter beacuse of speed and personal preference differences, but once we get a good real plugin system, image filters could be added to customize your installation! (that's a ways off though). Bicubic Sharper resampling - xebeque - 2006-05-27 Since then: How about using a simple sharpening as with image-magick convert? It´s much faster than unsharp mask but provides good results. Bicubic Sharper resampling - trisweb - 2006-05-27 It's in i.php -- you're welcome to try an ImageMagick conversion, but it's likely to be difficult... good luck! I'd be happy to help if you have questions, or maybe I'll just try it myself... Bicubic Sharper resampling - xebeque - 2006-05-29 Well - for me coding is like flying blind - I actually never learnt enough to get any usable results. Thus I give up. But i found the following code which might be helpfull for others: $sharpenMatrix = array(-1,-1,-1,-1,16,-1,-1,-1,-1); which is said to have a sharpening effect - but i cannot handle it. I also found a function gdImageSharpen(gdImagePtr im, int pct) (look here http://www.boutell.com/boutell/gdmanualtest.html#gdImageSharpen) Bicubic Sharper resampling - trisweb - 2006-05-30 Nah, it's okay. I probably wouldn't include any of that by default anyway. Leave it for a plugin developer later down the line Bicubic Sharper resampling - xebeque - 2006-05-30 Maybe somebody else with better coding skills is as impatient as I am... Bicubic Sharper resampling - trisweb - 2006-05-31 Impatient for sharpening? Wow... Try that convolution matrix in your earlier post again, you just have to do it before any image is saved (with the imagejpeg command). Read up on PHP and the GD image functions, it's not too bad Bicubic Sharper resampling - xebeque - 2006-06-02 I pasted the exact code from above before imagejpeg (after line 215 in i.php V. 1.0.3 beta). Bicubic Sharper resampling - trisweb - 2006-06-04 Ahh, this is called debugging! Check the logs for an error message, or disable the redirect (comment-out the header: Location line) and see what going to |