Forums / General / Images are slightly blurred...

Images are slightly blurred...

Author Message

Greg Sanderson

Monday 21 April 2008 10:19:44 am

Hi

Has anyone else had the problem that when you embed an image in a page it looks slightly blurred when you choose one of the sizes like "medium" to display it (ie not "original" size)? Is this a problem with PHP - I am using the GD2 library - or is it a problem with eZ's settings? Would installing imageMagick help?

If anyone has got any example sites where you have used the in-built resizing and your images are clear that would be great to look at too.

Thanks.

bisk

Monday 21 April 2008 11:24:40 am

I've had this problem as well. Using imagemagick fixed it for me.

I've tried all kinds of settings when using GD2, but images were always slightly blurred.

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

André R.

Monday 21 April 2008 11:31:01 am

imageMagick would help, but you can also try to tweak the jpg compression level.
Its set in image.ini, look for 'Quality[]=image/jpeg;75'.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Greg Sanderson

Tuesday 22 April 2008 2:48:51 am

I have tried increasing the quality to 100 but they still look blurred. Could it be that the image resampling function that resizes the images is being called twice, so they are getting blurred since they are being resampled twice? I can not find the function definition for ImageCopyResampled anywhere in my eZ folder - only where it is called in the ezimagegdhandler.php file.

I don't think it is a problem with GD - I have written my own image resizer and this gives great results. When I add an image, when it first appears in the editor if looks ok but when I click "send for publishing" and then refresh the browser window it looks slightly blurred... could it be resampled twice maybe?

Espen R

Friday 16 May 2008 7:02:06 am

This is true. It has been like this for years. Your images will indeed be resampled several times. This clearly has something to do with in which sequence you place the image settings in image.ini (or your override). To avoid resampling you should place the <b>largest</b> scaling first.

Like this:

[large]
MIMEType=image/jpeg
Filters[]
Filters[]=geometry/scale=600;600
Filters[]=quality=70

[medium]
Filters[]
Filters[]=geometry/scale=300;300

[small]
Filters[]
Filters[]=geometry/scale=100;100

It's incredible that so few people notice or complain about this.

Hope it helps anyway. :)

Hughes909 elite

Sunday 18 May 2008 3:28:56 pm

I have been suffering from this probelm! i have also written my own image resizing script its gives much better results.

Thank you

http://www.elitesat.com/hughesnet.asp
http://www.getdsltoo.com/satelliteinternet.asp

eZ debug

Timing: Jan 30 2025 19:38:09
Script start
Timing: Jan 30 2025 19:38:09
Module start 'content'
Timing: Jan 30 2025 19:38:09
Module end 'content'
Timing: Jan 30 2025 19:38:09
Script end

Main resources:

Total runtime0.3474 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0092 587.9219370.3047
Module start 'content' 0.00930.0137 958.22661,005.6094
Module end 'content' 0.02300.3244 1,963.83593,893.8125
Script end 0.3474  5,857.6484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00501.4280200.0002
Check MTime0.00150.4176200.0001
Mysql Total
Database connection0.00060.182510.0006
Mysqli_queries0.244570.36951410.0017
Looping result0.00160.45681390.0000
Template Total0.323993.210.3239
Template load0.00090.257010.0009
Template processing0.323092.979010.3230
Override
Cache load0.00060.180110.0006
Sytem overhead
Fetch class attribute can translate value0.00230.658310.0023
XML
Image XML parsing0.00030.087210.0003
General
dbfile0.00762.1887200.0004
String conversion0.00000.001530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs