In order to decode and display a JPEG image, you have to know what "color type" (or "color model") it uses. There are several possibilities that your software probably ought to handle: Grayscale YCbCr (transformed from RGB) RGB YCCK (transformed from CMYK) CMYK Unfortunately, if you look at all the bits and bytes that make … Continue reading How is a JPEG image’s color type determined?
Month: October 2018
Large prime numbers
As of this writing, the largest known prime number is 277232917-1. "Not large enough!", I say. Let's write a computer program that will print out a larger prime number. No, not a program that will take billions of years to run. It should take only a few minutes. There is a small catch. Hardly worth … Continue reading Large prime numbers
Summary of some Win32 I/O character encoding behavior
This is the first of a series of post. Here are the others: Part 2Part 3Supplement 1Supplement 2 This post is about programming a Windows Win32 application, mainly one that uses the console (command line). It summarizes the results of some tests I performed. Maybe you ported a Unix utility to Windows, but you find … Continue reading Summary of some Win32 I/O character encoding behavior