bit-depth

Reduce bit-depth of PNG files from the command line

拈花ヽ惹草 提交于 2020-01-03 17:47:09
问题 What command or series of commands could I execute from the CLI to recursively traverse a directory tree and reduce the bit-depth of all PNG files within that tree from 24bpp to 16bpp? Commands should preserve the alpha layer and should not increase the file size of the PNGs - in fact a decrease would be preferable. I have an OSX based system at my disposal and am familiar with the find command so am really more keen to to locate a suitable PNG utility command. 回答1: AFAIK the only PNG format

Difference between sampling rate, bit rate and bit depth

我与影子孤独终老i 提交于 2019-12-08 02:16:49
问题 This is kind of a basic question which might sound too obvious to many of you , but I am getting confused so bad. Here is what a Quora user says. Now It is clear to me what a Sampling rate is - The number of samples you take of a sound signal (in one second) is it's sampling rate. Now my doubt here is - This rate should have nothing to do with the quantisation , right? About bit-depth , Is the quantisation dependant on bit-depth? As in 32-bit (2^32 levels) and 64-bit (2^64 levels). Or is it

How to PHP get bit depth of a given PNG image file?

血红的双手。 提交于 2019-12-01 05:52:40
In PHP code, given an .png image path, I need to detect the bit-depth of that image. How can I do that? I've tried to use getImageSize() and read the bits as below sample code but it always returns '8' for 24-bits/32-bits image. Please help. class Utils { //Ham de lay bits cua image public static function getBits($image) { $info = getImageSize($image); return $info['bits']; } } PNG Images are not that supported for channels and bits by getimagesize() . However you can use a little function to obtain these values: get_png_imageinfo() : $file = 'Klee_-_Angelus_Novus.png'; $info = get_png

How to PHP get bit depth of a given PNG image file?

独自空忆成欢 提交于 2019-12-01 03:34:06
问题 In PHP code, given an .png image path, I need to detect the bit-depth of that image. How can I do that? I've tried to use getImageSize() and read the bits as below sample code but it always returns '8' for 24-bits/32-bits image. Please help. class Utils { //Ham de lay bits cua image public static function getBits($image) { $info = getImageSize($image); return $info['bits']; } } 回答1: PNG Images are not that supported for channels and bits by getimagesize(). However you can use a little

Color banding and artifacts with gradients despite using RGBA_8888 everywhere

十年热恋 提交于 2019-11-29 16:09:15
问题 I'm aware that colour banding is an old chestnut of a problem that has been discussed many times before with various solutions provided (which essentially boil down to use 32-bit throughout, or use dithering). In fact not so long ago I asked and subsequently answered my own SO question regarding this. Back then, I thought that the solution I put in the answer to that question (which is to apply setFormat(PixelFormat.RGBA_8888) to the Window and also to the Holder in the case of a SurfaceView

What is a channel in a .wav file format?Do all channels play simultaneaously when a wav file is played?

南楼画角 提交于 2019-11-29 03:50:54
I read about.wav file format by googling,all I could figure was that Frames are made of samples(of some defined bit depth) and a wav stereo file has a multiple of something called channels.... The confusion is whether a channel is made up of frames? Do all channels play along when I play some audio file? If a channel is made up of frames,are all channels equal in length(bit wise)? Please answer if someone can,I have to display each channel separately when playing a wav file in waveform In each frame in wav there are channels. If you have stereo sound, then each frame contains two samples (left

What is a channel in a .wav file format?Do all channels play simultaneaously when a wav file is played?

本小妞迷上赌 提交于 2019-11-27 17:45:57
问题 I read about.wav file format by googling,all I could figure was that Frames are made of samples(of some defined bit depth) and a wav stereo file has a multiple of something called channels.... The confusion is whether a channel is made up of frames? Do all channels play along when I play some audio file? If a channel is made up of frames,are all channels equal in length(bit wise)? Please answer if someone can,I have to display each channel separately when playing a wav file in waveform 回答1:

How can I check the color depth of a Bitmap?

☆樱花仙子☆ 提交于 2019-11-27 04:53:52
I'm working on an application that prints a folder of image files, including JPEG and TIFF. The TIFF images are usually Black and White (1bpp). After loading the image, I want to determine if the image is Color or B&W or Grayscale so I can send the image to the right printer (color printer or black and white printer). I'm using the Bitmap constructor image = new Bitmap(filename); to load the image. EDIT: The answer to check the pixel depth is great for B&W. Any ideas on checking if the image is grayscale without iterating through every pixel? The proper way to check this is: For JPEG files you

How can I check the color depth of a Bitmap?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 11:24:56
问题 I\'m working on an application that prints a folder of image files, including JPEG and TIFF. The TIFF images are usually Black and White (1bpp). After loading the image, I want to determine if the image is Color or B&W or Grayscale so I can send the image to the right printer (color printer or black and white printer). I\'m using the Bitmap constructor image = new Bitmap(filename); to load the image. EDIT: The answer to check the pixel depth is great for B&W. Any ideas on checking if the