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 2 (chcp 65001) Part 3 (the Unicode API) Supplement 1 (A Cygwin issue) Supplement 2 (setlocale enhancement) Supplement 3 (UTF-8 manifest) This post is about programming a Windows Win32 application, mainly one that uses the console (command line). It summarizes the … Continue reading Summary of some Win32 I/O character encoding behavior