class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
When uploading an image via class.upload 021 i detect a loss on quality. The jpeg_quality attribute is set to 100 now and still lossing quality. The original jpeg image is resized from 280x373 to 281x377 and croped. The thing is that the upload image has less definition, less sharpened. Like when a blur filter is applied on photoshop. Is there a way to avoid this?Reply
I'm afraid that you will loose some quality if you do any resizing.
Resizing an image means that you will have to average some pixels, thus bluring the picture a little bit.
It is planned down the track to add a sharpening feature to enhance a little resized images. But resizing means quality loss, that's the bottom line.Reply
First of all thanks again for your source code and for your support. Regarding teh image resizing I did the same resizing (original anf inal image are not that different in size) on photoshop and the resulting image was good in quality, not blurred. A better or alternative resizing algorithm could be offered or maybe what you are proposing, sharpening stuffReply
Photoshop is a bit more expensive than my class, isn't it? ;)
Basically, the class uses GD functions (and I assume you have GD 2+), which can only do so much.
It could be possible to use another algorithm, but it would be very slow if done in PHP. It is kind of planned in the future to use ImageMagick and/or GD for graphic manipulations, and maybe ImageMagick has a better resizing algorithm.
The sharpening filters will make the image look good, but it is only a trick. The loss of quality will still be there, even if not as noticeable.
So in fact, if you want advanced resizing, with a minimum loss, doing this in PHP might not be the best solution.Reply
Right!:-) Anyway, thanks again for your software! The CMF looks like a good idea as well... although Joomla, Drupal and others are so good... is the CMF a different concept of CMS?
Below my GD info: GD Support enabled GD Version bundled (2.0.28 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.3.2 GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabledReply
The CMF is a Content Management Framework. It is intended for professionals and programmers.
If anything, it is more similar to Drupal, but yet quite far. The CMF is great to quickly code a site. Most of the admin backend is generated automatically, as part of the site. The public frontend is generally coded for each client.
There is little demo site here that I have put up a while ago for my company, where we use the CMF for our clients.Reply
Resizing an image means that you will have to average some pixels, thus bluring the picture a little bit.
It is planned down the track to add a sharpening feature to enhance a little resized images. But resizing means quality loss, that's the bottom line.
Regarding teh image resizing I did the same resizing (original anf inal image are not that different in size) on photoshop and the resulting image was good in quality, not blurred.
A better or alternative resizing algorithm could be offered or maybe what you are proposing, sharpening stuff
Basically, the class uses GD functions (and I assume you have GD 2+), which can only do so much.
It could be possible to use another algorithm, but it would be very slow if done in PHP. It is kind of planned in the future to use ImageMagick and/or GD for graphic manipulations, and maybe ImageMagick has a better resizing algorithm.
The sharpening filters will make the image look good, but it is only a trick. The loss of quality will still be there, even if not as noticeable.
So in fact, if you want advanced resizing, with a minimum loss, doing this in PHP might not be the best solution.
Anyway, thanks again for your software!
The CMF looks like a good idea as well... although Joomla, Drupal and others are so good... is the CMF a different concept of CMS?
Below my GD info:
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.3.2
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
The CMF is a Content Management Framework. It is intended for professionals and programmers.
If anything, it is more similar to Drupal, but yet quite far. The CMF is great to quickly code a site. Most of the admin backend is generated automatically, as part of the site. The public frontend is generally coded for each client.
There is little demo site here that I have put up a while ago for my company, where we use the CMF for our clients.