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 Dec 13, 2023
1 parent 9c3e293 commit 3fbd4cb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
10 changes: 6 additions & 4 deletions 02-image-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -921,20 +921,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
4 changes: 2 additions & 2 deletions 03-skimage-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ Images may appear the same size in jupyter,
but you can see the size difference by comparing the scales for each.
You can also see the differnce in file storage size on disk by
hovering your mouse cursor over the original
and the new file in the jupyter file browser, using `ls -l` in your shell,
or the OS file browser if it is configured to show file sizes.
and the new file in the jupyter file browser, using `ls -l` in your shell
(`dir` with Windows PowerShell), or the OS file browser if it is configured to show file sizes.

::::::::::::::: solution

Expand Down
6 changes: 3 additions & 3 deletions md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"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" "b17ae758d5d8a2a81348306a97b37067" "site/built/02-image-basics.md" "2023-12-11"
"episodes/03-skimage-images.md" "063fa4bb5032702c0196b0d953d94474" "site/built/03-skimage-images.md" "2023-12-08"
"episodes/02-image-basics.md" "820c407cd1458111c2077a7062000916" "site/built/02-image-basics.md" "2023-12-13"
"episodes/03-skimage-images.md" "062a64330e0931c4622073fc2e13e26e" "site/built/03-skimage-images.md" "2023-12-13"
"episodes/04-drawing.md" "9d78a765f5e9747ffc2aa43a4a5a414d" "site/built/04-drawing.md" "2023-09-05"
"episodes/05-creating-histograms.md" "59c07192c0a6217e8a42d3e7365025f9" "site/built/05-creating-histograms.md" "2023-12-08"
"episodes/06-blurring.md" "8d109bb4c49f27f54857f6d35b4c6b9a" "site/built/06-blurring.md" "2023-12-08"
Expand All @@ -17,5 +17,5 @@
"learners/edge-detection.md" "fdbcee7436e104e6587e1cb40cd37d18" "site/built/edge-detection.md" "2023-08-16"
"learners/prereqs.md" "7ca883d3d01d18c98ce7524ed297e56c" "site/built/prereqs.md" "2023-07-26"
"learners/reference.md" "7ae9deea84007c6ed1339955ac23f4b7" "site/built/reference.md" "2023-04-26"
"learners/setup.md" "415b4d15608ca89783bafb8a90ee7a63" "site/built/setup.md" "2023-11-21"
"learners/setup.md" "6ebce925f61dd60b8b362cc0d1385bb7" "site/built/setup.md" "2023-12-13"
"profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2023-04-25"
4 changes: 4 additions & 0 deletions setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,8 @@ e.g. your Desktop or a folder you have created for using in this workshop.

:::::::::::::::::::::::::

5. A small number of exercises will require you to run commands in a terminal. Windows users should
use Powershell for this. Powershell is probably installed by default but if not you should
[download and install](https://apps.microsoft.com/detail/9MZ1SNWT0N5D?hl=en-eg&gl=EG) it.

[figshare-data]: https://figshare.com/articles/dataset/Data_Carpentry_Image_Processing_Data_beta_/19260677

0 comments on commit 3fbd4cb

Please sign in to comment.