Displayed Image Quality Reduction

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
destiny
Posts: 27
Joined: Fri 14. Nov 2003, 17:57
Location: Vor dem Computer
Contact:

Displayed Image Quality Reduction

Post by destiny »

Beitrag in Englisch, da vielleicht für mehr Leute interessant:

Hello Oliver,
I have searched the forum and read something about GD creating low quality thumbnails ... I have not found a solution. I think I have ImageMagick running (hosted webspace) but I am not sure..

The problem is, that if I upload images which are jpg compressed (png isn't supported at all right now, I think it wouldn't be possible to include png images with article&image) they are stored correctly and all, but are reduced greatly in quality when displaying. even when they shouldn't be resized. It is, though, although I entered the original image width (369 -> 340). It looks like a newspaper ...

Where could I possibly fix that? Even if I don't have Imagick, I'd like to turn the resizing thing off altogether.

The image which is displayed (with the coding errors / flaws visible) is even bigger than the original!!!


You can compare the picture and the displayed result here:
http://testbed.lavadots.com/asps.jpg Original
http://testbed.lavadots.com/asps_output.jpg Broken

- Max
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

That's normal. GD creates not so good resized images - and your original JPG has visible jpg artefacts - that results in additional artefacts what increases image size. If you want to have better resized images use high quality source images.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
oops
Posts: 35
Joined: Tue 18. Nov 2003, 01:14
Contact:

Post by oops »

Oliver Georgi wrote:That's normal. GD creates not so good resized images - and your original JPG has visible jpg artefacts - that results in additional artefacts what increases image size. If you want to have better resized images use high quality source images.

Oliver
i'm sorry...
ich habe dasselbe problem, wenn ich folgende variable definiere: img_quality = "75"; // 0 - 100

man kцnnte progressive JPEGs benutzen, um qualitдt zu verbessern. und IMagic ist keine lцsung
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

If you can - use GD2 NOT GD1. GD2 is much better.

If you have PHP 4.3 it is included - but often only GD1 is enabled.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
oops
Posts: 35
Joined: Tue 18. Nov 2003, 01:14
Contact:

Post by oops »

ja natürlich, ich benutze GD2 ...

:roll:
destiny
Posts: 27
Joined: Fri 14. Nov 2003, 17:57
Location: Vor dem Computer
Contact:

Post by destiny »

Wie enabled man das GD2 / zwingt Apache dazu es zu benutzen? Muss ich da was in Deinem Quellcode anpassen, Oliver?

Ich habe keinen Root Zugriff auf den Server, nur Scripte und .htaccess Dateien...

Wie meinst Du das mit imagequality, oops? Ist das aus Olivers Skript?
oops
Posts: 35
Joined: Tue 18. Nov 2003, 01:14
Contact:

Post by oops »

im script steht: $jpeg_quality="85"
maximum 100
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Ohne Änderungen in der PHP.INI = keine Anpassungsmöglichkeit für Dich bzgl. GD. Du kannst das über

Code: Select all

<?php
phpinfo();
?>
testen, welche GD bei Dir läuft. z.B könnte 1&1 mal auf > 4.3 updaten. Die krepeln immer noch mit weiß nicht wie alten Versionen rum.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
destiny
Posts: 27
Joined: Fri 14. Nov 2003, 17:57
Location: Vor dem Computer
Contact:

Post by destiny »

PHPInfo

--with-gd

GD Support enabled
GD Version 2.0 or higher <-
FreeType Support enabled
FreeType Linkage with freetype
JPG Support enabled
PNG Support enabled
WBMP Support enabled

Warum schaut das bei mir trotzdem so schlecht aus? Kann ich irgendwo die Imagequality (0 - 100 %) in Deinem Skript beinflussen?
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Du musst definitiv weniger stark komprimierte JPGs an das System senden.

Aus Schrott wird bei JPG nur noch mehr Schrott ;-)

Guck mal in die imagick.convert.inc.php - da gibt es in der function Zeile einen Qalu-Wert - wie hier schonmal beschrieben.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
destiny
Posts: 27
Joined: Fri 14. Nov 2003, 17:57
Location: Vor dem Computer
Contact:

Post by destiny »

Danke. Ich werde mich um die Probleme kümmern.

Leider liegen viele Bilder aber bereits in .jpg vor, und zwar nicht 100% Qualität ... :D
Marko
Posts: 65
Joined: Tue 2. Dec 2003, 23:58
Location: Finland

Post by Marko »

Well, can't understand a word, but I'm guessing this relates to poor image quality... I have the same problem and I was wondering is there any chance to improve it? I found file include/inc_lib/ext/hft_image/hft_image.php and set image quality to 100 but this hasn't improved the over all quality at all. Before PHPWCMS I used script called 4images and it produced excellent images without any losses in quality. I guess this has something to do with this particular script.

Is it possible to change to script which produces images and thumbnails in PHPWCMS, or is somehow integrated with the core itself? If not so, please give me a hint wherefrom to look for improvements...
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Yes. There is a problem when converting GIF images. I will have a look later again to optimize this a bit more.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Marko
Posts: 65
Joined: Tue 2. Dec 2003, 23:58
Location: Finland

Post by Marko »

Thanks Oliver,

First things first, and this isn't one of them. :D
tyr
Posts: 31
Joined: Tue 9. Dec 2003, 04:36
Location: Pennsylvania, USA

transparent GIFs imported with solid backgrounds

Post by tyr »

FYI -- Part of the GIF problem -- when I import GIFs with transparent backgrounds phpWCMS fills them black.
Post Reply