I already manage to manually create the bitmap of an uploaded image, by manipulating the color channels to obtain an 8 bit image. Now, i'm in the need of converting the bitmap to jpeg but i need to maintain the bit depth (8 bits depth single-channel) I can't use Canvas since when the conversion is done the resulting file is 24 bit depth. Anyone knows if this possible to use JavaScript to do this conversion, so i can have all the image manipulation on the client-side?