473,387 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

image quality (using GD library)

Hi,
I use GD library to generate images from photographs, approx this code :
$image_dst =
imagecreatetruecolor($this->image_dst_x, $this->image_dst_y);
imagecopyresized($image_dst, $image_src, 0, 0, 0, 0,
$this->image_dst_x, $this->image_dst_y, $this->image_src_x,
$this->image_src_y);
$result = @imagejpeg ($image_dst,
$this->file_dst_pathname,100);

but...
- generated image size is larger than the original photo's one
- generated image quality is rather bad

So I think I'm doing something wrong, but don't know what...
Thanks for any help !

Thanks also for telling me if there is a place (newsgroup) to specifically
discuss about GD library, I didn't find any on Boutell's site.
Jul 17 '05 #1
3 5455

"Christophe Cerbourg" wrote

you can view the source code of this script.

http://www.sephiroth.it/file_detail.php?id=131

bye Daniel
http://www.gizax.it
Jul 17 '05 #2
> you can view the source code of this script.

http://www.sephiroth.it/file_detail.php?id=131


thanks !
Jul 17 '05 #3
Also might try resampling the image. The file is likely larger because
you save it with 100% quality (even if the original file is only 75%)
which can increase the size dramatically in some cases...

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sean | last post by:
i am writing a class that visual demonstrates the result of changing the quality of a jpeg. the intention is to do this by saving the file and a selected quality, then reloading it to get an idea of...
2
by: Travis | last post by:
Hi everyone, I'm using the System.Drawing.Imaging.Bitmap to retrieve and modify the metadata tags (user comments, keywords etc) of JPEGS. I was wondering if changing these tags in any way...
6
by: Chris D | last post by:
Hi, I have an application where a user uploads an image and I create two thumbnails. One a small image and the second is a larger image but still smaller then the original. I store these in SQL...
6
by: neverstill | last post by:
hi- So I wrote this nice little page that will allow the managers to add images to the products table. Without too many details to confuse everything, basically what I'm doing is: getting an...
4
by: Steve Peterson | last post by:
Hi I've been beating my head against the wall trying to get this done, with little to no success so I thought I would turn to the .Net community for some help. I have an .NET app in which the...
5
by: Philippe Martin | last post by:
Hi, Thanks to the NG, I got the script hereunder working. 1) I am not certain that the call to convert does much (checking the doc) 2) Can this be improved as far as the final image size in...
4
by: Liming | last post by:
Hi, I've managed to create a bitmap and output it via the httphandler by setting Response.ContentType="image/gif" the resulting GIF quality is REALLY bad. I searched around the web, the only...
9
by: kombu67 | last post by:
I'm reading a series of images from a MS SQL table and saving them to directory. These are staff ID pictures from our security card app. Once I've extracted the ID photo from the security app to...
11
by: shapper | last post by:
Hello, I am displaying an image on a few pages. The image size is 50 px height and 50 px width. In some pages I need the image to be 30x30 px in others 40x40 px and in others 50x50px. Can I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.