Copy all the files of /home/brock/ImageLab %% cp -r /home/brock/ImageLab . Connect to your new directory and look at the size of the files in the directory. %% cd ImageLab %% ls -l We'll start by looking at five different compression algorithms. First, look at the "man" pages for the four common ones (only the first couple of screenfuls). %% man compress %% man gzip %% man bzip2 %% man zip You'll notice some discussion of the relative merits. This table give the names of the compression and uncompression routines COMPRESS UNCOMPRESS compress uncompress gzip gunzip bzip2 bunzip2 zip unzip In turn, use these four compression algorithms and notice how well each does. Use "ls -l" to write down the file compressed size *and* its name. %% compress Main.txt %% uncompress Main.txt.Z %% gzip Main.txt %% gunzip Main.txt.gz %% bzip2 Main.txt %% bunzip2 Main.txt.bz2 [ You can avoid overwriting the file by using the Unix/DOS file redirection. Then your commands will look something like: %% compress < Main.txt > Main.txt.Z ] Now try these three compression algorithms with ASSURC05.htm, the program for Undergraduate Research Day. Notice that you'll get a different set of winners this time. First, use wget to obtain a copy of the program %% wget http://www.unca.edu/urp/ASSURC05.htm Then try the compression algorithms. What about ZIP, the favorite of the PC world. ZIP wants to compress archives, or collections of files, so it has a different syntax. However, try it out. %% zip Main ASSURC05.txt %% zip ASSURC05 ASSURC05.htm It's not the best. It's not the worse. The best lossless compression algorithms are based on PPM (Prediction with Partial Match). Go ahead and do a Google search for "Prediction with Partial Match". PPM algorithms are that widely accepted, so they are not a good way to transfer information. You've copied one of them to your ImageLab directory. Try it out %% ./paqc -1 XXX Main.txt %% ./paqc -1 YYY ASSURC05.htm The "-1" tells paqc it is compressing a text file. You should see that it does noticeably better. What happens if you compress a file multiple times with these algorithms? Does it keep getting smaller. Try it. Run bzip2 then gzip. **************************************************************** Now try out one of my first Java applications. I was practicing for teaching the course http://www.cs.unca.edu/~brock/java/java-1.1-0/ColorPlay.html Set Saturation and Brightness to their maximum. (OK... So there's a little bug, but I said it was one of my first Java programs.) Now change Hue. Now try out a better program http://www.cs.rit.edu/~ncs/color/a_spaces.html Be sure do use your mouse to rotate the cubes. For some more technical information, look at http://developer.apple.com/documentation/mac/ACI/ACI-48.html http://www.cs.rit.edu/~ncs/color/t_convert.html **************************************************************** Free photo editors are very hard to find. Start up gimp Now load the file Main.pnm. Zoom into the file and figure out what it is. Now, re-save the file as both a GIF and PNG image. Compare the sizes of the original and new files. Since GIF and PNG are lossless, you can delete the Main.pnm and save us some backup space. Now save the file as jpg -- but save it twice with differing quality. Give you save files unique names, like Main-Q15.jpg and Main-Q85.jpg. Look at the sizes of the files. Don't be too shocked if they are larger than the png and gif. This is a bad file for jpg. Read in the saved jpg files. You'll notice that the letters are now noticeably fuzzy. For GIMP information try out: http://www.cs.unca.edu/~brock/Grokking-the-GIMP-v1.0/ Try out a little drawing. You'll probably find it best to start with a new picture. **************************************************************** Noise reduction Use GIMP to look at the picture Scan35mm.jpg in your ImageLab directory. Zoom into the picture and notice all the "noise" in the image. Now go into Google and look up pages on how to reduce noise in the image. See if you can reduce the noise and then store the image at a reasonable resolution.