Skip to content

Commit

Permalink
differences for PR #307
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 21, 2023
1 parent bdbeda5 commit d91a205
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions 02-image-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -881,20 +881,22 @@ two orders of magnitude smaller than the bitmap version.
## Comparing lossless versus lossy compression (optional, not included in timing)

Let us see a hands-on example of lossless versus lossy compression.
Once again, open a terminal and navigate to the `data/` directory.
Open a terminal (or Windows PowerShell) and navigate to the `data/` directory.
The two output images, `ws.bmp` and `ws.jpg`, should still be in the directory,
along with another image, `tree.jpg`.

We can apply lossless compression to any file by using the `zip` command.
Recall that the `ws.bmp` file contains 75,000,054 bytes.
Apply lossless compression to this image by executing the following command:
`zip ws.zip ws.bmp`.
`zip ws.zip ws.bmp`
(`Compress-Archive ws.bmp ws.zip` with PowerShell).
This command tells the computer to create a new compressed file,
`ws.zip`, from the original bitmap image.
Execute a similar command on the tree JPEG file: `zip tree.zip tree.jpg`.
Execute a similar command on the tree JPEG file: `zip tree.zip tree.jpg`
(`Compress-Archive tree.jpg tree.zip` with PowerShell).

Having created the compressed file,
use the `ls -al` command to display the contents of the directory.
use the `ls -al` command (`dir` with PowerShell) to display the contents of the directory.
How big are the compressed files?
How do those compare to the size of `ws.bmp` and `tree.jpg`?
What can you conclude from the relative sizes?
Expand Down
2 changes: 1 addition & 1 deletion md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"config.yaml" "101b3ac4b679126bb1f437306eb1b836" "site/built/config.yaml" "2023-04-25"
"index.md" "6e80c662708984307918adfad711e15f" "site/built/index.md" "2023-07-26"
"episodes/01-introduction.md" "9755639c515fdbf752422e2e59128f63" "site/built/01-introduction.md" "2023-07-26"
"episodes/02-image-basics.md" "182febb8af73f7bd7a5815f296c4dfec" "site/built/02-image-basics.md" "2023-10-30"
"episodes/02-image-basics.md" "e346c0d7d0e24783b3a268afae1d930d" "site/built/02-image-basics.md" "2023-11-21"
"episodes/03-skimage-images.md" "eb0da8ebdea3bf84510b22581b790e67" "site/built/03-skimage-images.md" "2023-10-13"
"episodes/04-drawing.md" "9d78a765f5e9747ffc2aa43a4a5a414d" "site/built/04-drawing.md" "2023-09-05"
"episodes/05-creating-histograms.md" "bdcf983127c242eb995605038598d09f" "site/built/05-creating-histograms.md" "2023-09-18"
Expand Down

0 comments on commit d91a205

Please sign in to comment.