Imaging concepts: Encrypting images

  • Post author:
  • Post category:Imaging

DES in Electronic Code Book (ECB) mode is a particularly poor choice of cryptography for image files. This is because ECB mode implements a look up table between the unencrypted value and the encrypted value. This results in a known input value turning into the same output value over and over. This can have some interesting blurring effects, but wont obscure the image contents. An example will help this make more sense -- the first figure is the logo for the company I am currently working for. I took this image, and ran it through some DES ECB code and produced the second figure. You can see that whilst the image has certainly changed, the contents of the image has not really been obscured. We should note that ECB mode is not commonly used anyway. If you use something like PGP or blowfish, then you should be much happier...

Continue ReadingImaging concepts: Encrypting images

Imaging concepts: Anti Aliasing

  • Post author:
  • Post category:Imaging

Imagine that you are drawing a triangle across an image (or on the screen for that matter). The triangle is sometimes going to cross pixels in a way which makes them not totally turned on. Have a look at the figure below to see what I mean... If we only have a black and white image, then we'll end up with an image like the one in the figure below. I am sure you'll agree that this isn't a very good representation of the side of the triangle. Anti-aliasing is when we try to correct for this problem by inserting some gray pixels. In the figure below, we have given some of the pixels a gray value which is based on how much of the pixel is "filled" with the triangle. The triangle might be a little clearer without the grid lines. If you compare that with the triangle we started with above, then you can see the obvious difference. So, in summary, anti-aliasing is the process of turning on some extra gray scale pixels to improve the look of shapes we are drawing... Now, whether you actually like anti aliasing or not is another matter. A lot of people,…

Continue ReadingImaging concepts: Anti Aliasing

Assumed knowledge

  • Post author:
  • Post category:Imaging

There are some things which I assume you know, and which are outside the scope of this tutorial. C This tutorial discusses code. Almost all of the code discussed is written in C. It is therefore safe to assume that if you don't have a good working knowledge of C, then you're likely to get a lot less out of this tutorial as those who do know some C. On the other hand, don't worry about the more esoteric syntax, I'll explain this as we need it. It should also be noted that the code samples in this tutorial are not optimal. They have been written to be as readable as possible, and not necessarily the most efficient possible. Please bear this in mind before blindly copying them. How to compile and link on your chosen operating system It is outside the scope of this document to teach you how to compile and link source code into an executable form on your chosen architecture and operating system. You will need to understand this before you will be able to use any of the code in this document. For those of you using gcc on a Unix (or Unix-like) operating system,…

Continue ReadingAssumed knowledge

An experiment in online authoring — my image programming tutorial

  • Post author:
  • Post category:Imaging

I don't view myself as an author -- I'm a programmer. I have however written a few articles and conference papers in my time. Here are the ones relevant to this topic area: September 2001: Australian Unix User's Group Annual Conference Proceedings, Open Source PDF handling with Panda and PandaLex (not online at the moment, but I intend to fix that sometime soon) March 2002: IBM Developer Works, Graphics programming with libtiff: Black and White June 2002: IBM Developer Works, Graphics programming with libtiff: gray scale and color images July 2003: IBM Developer Works, Graphics from the command line: Flip, size, rotate, and more with ImageMagick (this item was subsequently linked to and discussed on Slashdot, Linux Weekly News, Linux Today, LinuxDevices.com, Linux.com / OSDN, linux.box.sk, and many other sites) August 2003: Linmagau, JPEG to MPEG conversion howto March 2004: IBM Developer Works, More graphics from the command line I've also written a bunch of imaging software, including lots that uses libtiff, some libpng tools, and my own PDF generation library. They're all open source, and available at at this site. Back in 2002 I put a fair bit of effort into writing up an imaging tutorial for the annual…

Continue ReadingAn experiment in online authoring — my image programming tutorial

End of content

No more pages to load