Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8275659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:08:45+00:00 2026-06-08T08:08:45+00:00

In a webappp I am currently creating the user has to provide images that

  • 0

In a webappp I am currently creating the user has to provide images that get stored server side in a database. To minimize server load I am handling image resizing client-side courtesy of the HTML5 Canvas and getting the user to pre-approve the quality of the resized image.

The issue I have run into is this – the file size of the resized image is big. If I resize the same image with Paint.NET I can get a perfectly decent light weight 8 bit PNG image. Even the 32 bit Paint.NET image is smaller than the one that turns up on the server via toDataURL. I tried playing around with the toDataURL quality parameter but changing it has no effect whatsoever – exactly the same data size.

I should mention tha t I am testing with Chrome 20.0.1132.57 m and that the only browsers that are relevant to the app are the desktop versions of Chrome and Safari.

I know I could do some server side image processing but I want to avoid that if possible. Question – what, if anything can I do to cut down on the image file size sent out from the browser?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:08:47+00:00Added an answer on June 8, 2026 at 8:08 am

    Browsers may happily ignore any quality parameter given for the toDataUrl and such. I don’t believe honoring it is mandatory by the specification.

    The only way to control the quality exactly would be

    • Write your own PNG compressor in JS or use something you can steal from the internets https://github.com/imaya/CanvasTool.PngEncoder

    • Dump <canvas> data to ArrayBuffer

    • Pass this to WebWorker

    • Let WebWorker compress it using your PNG compressor library

    I believe there exist JPEG/PNG encoding and decoding solutions already.

    Alternative you may try canvas.mozGetAsFile() / canvas.toBlob(), but I’ll believe browsers still won’t honour quality parameters.

    https://developer.mozilla.org/en/DOM/HTMLCanvasElement/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bunch of existing client/server applications that are currently chugging along. Once
Im building a website/webapp that uses sockets.io Currently if the user is using safari
So for my webapp, if I remove a user that is currently logged in,
I'm currently coding up the server-side of a webapp for the first time in
I have a webapp that currently stores all of a user's searches into a
I'm developing a web application that also has a mobile webapp. I currently use
Currently suppose xyz.com executes webapp ROOT. How can I configure my tomcat; so that
I'm currently implementing a HTML canvas based webapp that features panning. Is there a
So I'm creating a few webapps that need to be tested over our local
I'm creating a webapp which involves displaying financial data to the user. Being from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.