Questions tagged [24-bit]

"24bit" is usually used to specify a specific attribute. It is mostly used with images and audio files.

24bit term is widely used in DSP (Digital Signal Processing).

With images, it can indicate the color depth: the number of bits used to indicate the color of a single pixel. 24-bit color is also known as "True color". In such images each pixel is represented with 3 bytes, and can store one of 16,777,216 colors.

With sound, it can indicate the audio bit depth, which represents the resolution of each audio sample. 24bits is as much as is used in DVD-Audio.

More information can be found on the "Color depth" and "Audio bit depth" articles on Wikipedia

63 questions
0
votes
1 answer

How to convert RGB24 to RGB for web?

I have some colors in RGB24 format, for example: 1581613 How to convert it to RGB for web usage? If I understand correctly, the format is as follows RRRGGBB. Last code i've trying to run is: const color = 1581613; const red = (color >> 5) * 255 /…
0
votes
0 answers

Handling 24bit 96000Hz files with Pydub

I am impressed with Pydub pitch function. Tried a lot of pitch programmes but never could get a good result. Meaning with out echo ore hearing samples missing - short soundout fall, ore blurring sound. Now I find out that Pydub is not able to…
Crojav
  • 19
  • 3
0
votes
1 answer

naudio 32bit ieee float to 24bit

In NAudio I need to play a WAV file with an ASIO driver that only accepts 24bit audio. The wave stream is stored in a wav file, but it is 32bit ieee float. I need to convert the stream from 32bit to 24bit. I tried all the NAudio conversion functions…
nikez
  • 11
  • 2
0
votes
0 answers

how to make Image save as a 24-bit image?

How do I get C# to force bitmap images that are saved to be saved as 24-bit images as can be seen when you get the right-click properties of the image in Windows. All the images I save are set to 32-bit. I tried the below code with no luck. The…
장재훈
  • 1
  • 1
0
votes
1 answer

concatenating a Hexadecimal number with zeros

I have written a simple code to convert a fractional number to 24bit (3 bytes, 6 characters) Hexadecimal number. Lets say if you enter 0.5, it provides the hexadecimal number as 0x400000. 0.1 = 0xccccd 0.001 = 0x20c5 While the answers are…
Big Head
  • 49
  • 6
0
votes
0 answers

fail init ALSA for 24bit file with SND_PCM_FORMAT_S24_3LE format

I am trying to playback 24bit wav file with 3-bytes sample allignment using ALSA (libasound.so.2). And ALSA fails on setting buffer size with Invalid argument error (and ALSA do not pass anything to drivers) Here is wav file header content: chunkId:…
Peter K.
  • 134
  • 7
0
votes
4 answers

Reducing sample bit-depth by truncating

I have to reduce the bit-depth of a digital audio signal from 24 to 16 bit. Taking only the 16 most significant bits (i.e. truncating) of each sample is equivalent to doing a proportional calculation (out = in * 0xFFFF / 0xFFFFFF)?
lornova
  • 6,667
  • 9
  • 47
  • 74
0
votes
0 answers

Reducing size of png using pngquant applicatipon

i have millions of map tiles as png format. All files in subdirectories like 0/0/0.png,1.png... how can i reduce size of my all png using pngquant batch command
0
votes
0 answers

upload image as 24bit pixel format

I use an asp file uploader to upload a bitmap image. The original image is saved in hard disk in 24 bit format but the uploader converted it to 32 bit and subsequently gives wrong result in my web application How can I upload image as its original…
wathiq
  • 1
  • 1
0
votes
2 answers

Convert 24 bit 2's Compliment (MSB first) value to a voltage

I have an ADC (AD7767) that I am using to measure a differential signal. The data coming from the ADC is a 2's compliment MSB first 24 bit value. I want to convert this value to a voltage. The reference voltage being used is 5 Volts. I'm using the…
Aaru
  • 31
  • 1
  • 6
0
votes
1 answer

How to read and write 24-bit registers using spi code?

I am trying to interface a heart rate sensor with my processor. All the register in it are 24-bits in size . My doubt was can I use the spi driver code from github for this purpose. I am not sure if it would read or write 24-bits. I have taken the…
Sathya
  • 23
  • 3
0
votes
1 answer

Python, How to record 24-bit audio with pyaudio?

I need to record 24-bit audio using python, and I try pyaudio to do that. However, it seems that pyaudio doesn't support 24-bit recording. I set the format to 24-bit(pyaudio.paInt24), it record and save as a 24-bit file. However, it's not a true…
0
votes
1 answer

Writing bitmap 24 bit color odd behavior

I'm writing my own bitmap generator in c and I've run into some behavior that I can't figure out. I'm storing pixel data in a 2D array of a pixel struct I wrote. I write my structs directly to the file after the headers. typedef struct { uint8_t…
Reid A
  • 101
  • 1
  • 1
  • 7
0
votes
1 answer

Transfer of pixel data: 24BPP images and GL_UNPACK_ALIGNMENT set to 4

In my OpenGL program, I'm loading a 24BPP image with the width of 501. The GL_UNPACK_ALINGMENT parameter is set to 4. They write it shouldn't work because the size of each of the rows which are being uploaded (501*3 = 1503) cannot be divided by 4.…
somnock
  • 147
  • 10
0
votes
1 answer

Matlab: Load .tif > convert bmp 256 > convert bmp 24-bit

For some coding I would like to do the following: Read .tif file Convert to .bmp with 256 colours (got this from paint, can't find it in matlab!) Convert to .bmp with 24-bit (normal conversion to .bmp is 24-bit, this works) The problem is within…