[SOLVED] File Upload's, fuzzy appearance!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

File Upload's, fuzzy appearance!

Post by Joe »

I have a code which allows you to upload picture files and it works great however, when an image is uploaded and viewed it does not look the way it should. By that I mean colours are all smudged and the picture is fuzzy.

Can anyone please tell me why this is happening?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

are you resizing or resampling the image? depending on what you do with it, it could get mangled a bit.. Some other binary data may have crept into the binary stream as well..
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

OK Thanks feyd, the image is not resized or resampled at all so I am curious :O

Documents etc seem to upload fine its only when I upload an image the fuzziness occurs.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

so it's a straight upload. hmm.. can you post an example of the before and after?
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

BEFORE

Image

AFTER

Image
[/img]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

looks like the data got corrupted in transfer or something.. the uploaded image (image.jpg) is 9K larger than the original image (image1.jpg).. looking at the diff, there's only data added to image.jpg.. interesting..
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Yes indeed, I have made many upload handlers and this is the first I have ever seen of this problem!
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Could be somehow that the upload was not complete.. or the server/ client connection glitched for a moment cuasing it to be only partially uploaded. as feyd said it got corrupted, which is not so strange @ all. seen many transfers go corrupt. Never with webupload but seen enough with ftp transfers.

nothing you can do about that i am afraid.
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Well I have made many upload scripts and they all work perfect. I have tried uploading again and again wuth the exact same results so I am thinking the customers server has something wrong with it.
brandan
Forum Commoner
Posts: 37
Joined: Sat Jul 24, 2004 6:39 pm
Location: fort smith, ar

Post by brandan »

looks like what happens to an image when you don't enable binary transaction for an ftp connection.
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

What's your upload code look like?
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

It's ok now, thanks alot everyone. The problem was due to a simple server maintinence and all is working well now :D
Post Reply