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?
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
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 that it doesn’t work with filenames that contain Japanese characters. This information may help, though specific recommendations will…… Continue reading Summary of some Win32 I/O character encoding behavior