Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

JPEG - Quality


fredrik_76

Recommended Posts

Hello vger,

 

There was no problem installing, everything works fine. My problem is that the thumbnail have very low quality, so I combined some code from your contrib 3423 with sime lines from contrib 1484. That worked great, the original pics are 50-80KB, with your contrib the thumnails is 2-4KB in size and now with the code from contrib 1484 the size is 8-12KB. My problem is that the quality is still to low for us. I will try modify the code from Contrib 1484 so the quality can be more than 100. 200 makes the same size thumbnail as 100.

 

This is the code, it is not written by me:

#################################################

# 7 July 06 - Olaf Noehring ([email protected] // http://www.team-noehring.de)

# Added possible definition of JPG thumbnail quality

# Changed number of steps for this contrib

#

#IF you are UPDATING and need to add the jpg quality only, do this (complete INSTALLATION instructions below):

#open /catalog/include/functions/html_output.php

#search for

# function thumbimage ($image, $x, $y, $aspectratio, $resize, $cachedir){

#directly after add

# define(JPEGQUALITY, 95); //define the quality of JPG thumbnails

#search for

# call_user_func("image".$types[$imagedata[2]], $thumb, $cachedir.$thumbfile);

#replace with

# if ($types[$imagedata[2]] == "jpeg") {

# call_user_func("image".$types[$imagedata[2]], $thumb, $cachedir.$thumbfile, JPEGQUALITY);

# }

# else {

# call_user_func("image".$types[$imagedata[2]], $thumb, $cachedir.$thumbfile);

# }

#UPDATE done

#################################################

 

/Fredrik

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...