Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 PNG image attachment automatically gets JPEG-ed, This forum software is dumb

views
     
TSxenon
post Mar 22 2007, 07:47 PM, updated 19y ago

On my way
****
Senior Member
502 posts

Joined: Jan 2005
From: Selangor

I'm just expressing my discontent on this forum software. Whenever I want to attach a screenshot, I face this problem.
Take this example http://forum.lowyat.net/index.php?act=Atta...=post&id=207929
My original PNG file is 11.3kB, after attaching, the forum does some unnecessary work, recoding the image to JPEG sizing 55.9kB. The result is poorer image quality (mosquito artifacts) and multiple folds increase in file size.

I can get by this problem by using GIF format, but for more than 90% of the time, PNG achieves smaller size. In this example, the GIF is 27.6kB (still better than the forum software auto-JPEG). Another way is by using external image hosting. But I prefer to store those 20kB pictures on forum.lowyat.net as it is most likely loads fastest for the users.

So, my conclusion is this forum software is torturing itself, wasting computing resource, wasting disk space, wasting bandwidth. Solutions?
TSxenon
post Mar 22 2007, 07:59 PM

On my way
****
Senior Member
502 posts

Joined: Jan 2005
From: Selangor

Oh, yeah. I think I experienced that before, smaller dimension (number of pixels) behave differently. Try bigger ones? 400x300 maybe?

Nope, the thumbnail JPEG is acceptable, but the problem is full size also JPEG.

This post has been edited by xenon: Mar 22 2007, 08:00 PM
TSxenon
post Mar 24 2007, 07:54 AM

On my way
****
Senior Member
502 posts

Joined: Jan 2005
From: Selangor

I think the watermark adding doesn't happen to GIF attachment. By the way, I don't like watermark. Vote for remove watermark code.
TSxenon
post Aug 11 2007, 08:12 AM

On my way
****
Senior Member
502 posts

Joined: Jan 2005
From: Selangor

Problem not solved yet.
Another problem is zip file gets gzip-ed automatically.
I would like the attachments to be treated as raw bytes, verbatim. The forum software shouldn't go busybody interpreting the bytes that I send.
It should also treat the whole file name as one string, don't interpret the extension. I found that the zip file problem occurs when the file name ends with .zip, it will not occur when it is named otherwise. There are quite a lot of file extensions not allowed as attachment, for example .7z.

My suggestion on extensions is just to disallow file names ending with .exe while uploading, otherwise allow the attachment, don't interpret what is the extension, don't look into the bytes of attachment. Maintain byte-for-byte of the upload. The extension can however be used to set the Content-Type of HTTP header when a forumer wants to download the attachment. But the Content-Type setting should be minimal, only for .png, .jpg, .gif, .txt, for example. Other files should be just octet stream.

This post has been edited by xenon: Aug 11 2007, 08:31 AM


Attached image(s)
Attached Image

Attached File(s)
Attached File  430787_zip_test.zip ( 10.67k ) Number of downloads: 37
TSxenon
post Sep 15 2007, 11:32 PM

On my way
****
Senior Member
502 posts

Joined: Jan 2005
From: Selangor

erm, not yet?
http://forum.lowyat.net/topic/519506

 

Change to:
| Lo-Fi Version
0.0158sec    1.81    7 queries    GZIP Disabled
Time is now: 23rd December 2025 - 01:03 AM