473,569 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to resize image by GD in PHP without color noise?

HongThao
4 New Member
Hi all,

I need to change image's size by GD in PHP. An fix image at the first layer, the second

layer has an transparent image with white background. We can't see this white background because I did:
[PHP]$trans = imagecolortrans parent($layer_2 ,$white);[/PHP]
There are 2 buttons "Zoom in" and "Zoom out" that user can change image size whatever they want. My problem is:
After changing the first time it's fine. Continue to change one more time the image's background has color noise.
Does anyone have idea that help to solve the background color noise?
Thanks so much,
Hong Thao
Oct 19 '07 #1
1 1028
HongThao
4 New Member
Hic, why no anybody answer my question? I'm still waiting. ;(
Oct 23 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
6921
by: Giovanni | last post by:
Hello, I need to insert a resized image in a html page. I know that using the html IMG tag it is possible to set the height and width attributes, with no need of php (or server-side processing). But my problem is the following: I need to use the resized image as a table background - and unfortunately html doesn't support the resize...
4
14463
by: Julia Briggs | last post by:
I am struggling to create a PHP function that would take a specified image (JPG, GIF or PNG) from a link, and resize it down to a thumbnail so it will always fit in a 200x250 space. I am hoping not to have it inserted or read from a database to do this function. Can it be done & someone please help me?
3
5440
by: querypk | last post by:
Hi I would like to know how to resize an Image without using python Imaging library.
6
8096
by: Weng kin | last post by:
Hi everyone, I have a problem trying to load an image without the image resizing itself to fit into the window. My simple javascript is as follows: function viewImage(filename) { features = "height=500, width=670, scrollbars=yes, resizable=yes"; photo = window.open(filename, "Preview", features); }
3
3249
by: Z D | last post by:
Hello, BACKGROUND: ============== I've created a Windows User Control that contains an Image Control (among other controls). The user control handles the picture resize event. Whenever the parent that holds my user control is resized, I resize my image so that it uses the maximum available space. Note: It takes about 2 seconds to...
0
898
by: funcSter | last post by:
I've got this bit of code: Image origImage = Image.FromFile("temp.jpg"); Image newImage = new Bitmap(objNewSize.Width, objNewSize.Height, origImage.Pixelformat); Graphics objGraphic = Graphics.FromImage(newImage); objGraphic.CompositingQuality = CompositingQuality.HighQuality; objGraphic.SmoothingMode = SmoothingMode.HighQuality;
2
9422
by: Carl Gilbert | last post by:
Hi I am looking for either a component or technique to allow me to do the following: * Provide a panel with a background image * Resize the image to best fit the panel to maintain aspect ratio * Provide white (or other color) borders at the sides or the top/bottom The last point would be used to allow users to resize the panel to any...
15
5313
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the path of the uploaded image, and resize it with the provided dimensions. My function is below. The current function is returning an error when run...
7
2361
by: windandwaves | last post by:
Hi Folk I use a pop-up window on www.wapitipark.co.nz to view images. On some sites, I saw (a long time ago) a trick where they use Javascript to resize the window to the size of the image. Do you know how to do this? TIA
0
1223
HongThao
by: HongThao | last post by:
Hi all, I need to change image's size by GD in PHP. An fix image at the first layer, the second layer has an transparent image with white background. We can't see this white background because I did: $trans = imagecolortransparent($layer_2,$white); There are 2 buttons "Zoom in" and "Zoom out" that user can change image size whatever they...
0
7618
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7679
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2117
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
946
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.