Skip to content

Commit 0c8bfff

Browse files
authored
Merge pull request #307 from JeremyPike/comparing-compression-windows
Comparing lossless versus lossy compression for Windows users
2 parents 42bb13a + e79a076 commit 0c8bfff

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

episodes/02-image-basics.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -921,20 +921,22 @@ two orders of magnitude smaller than the bitmap version.
921921
## Comparing lossless versus lossy compression (optional, not included in timing)
922922

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

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

936938
Having created the compressed file,
937-
use the `ls -al` command to display the contents of the directory.
939+
use the `ls -l` command (`dir` with PowerShell) to display the contents of the directory.
938940
How big are the compressed files?
939941
How do those compare to the size of `ws.bmp` and `tree.jpg`?
940942
What can you conclude from the relative sizes?

episodes/03-skimage-images.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ Don't forget to use `fig, ax = plt.subplots()` so you don't overwrite
187187
the first image with the second.
188188
Images may appear the same size in jupyter,
189189
but you can see the size difference by comparing the scales for each.
190-
You can also see the differnce in file storage size on disk by
190+
You can also see the difference in file storage size on disk by
191191
hovering your mouse cursor over the original
192-
and the new file in the jupyter file browser, using `ls -l` in your shell,
193-
or the OS file browser if it is configured to show file sizes.
192+
and the new files in the Jupyter file browser, using `ls -l` in your shell
193+
(`dir` with Windows PowerShell), or viewing file sizes in the OS file browser if it is configured so.
194194

195195
::::::::::::::: solution
196196

learners/setup.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,8 @@ e.g. your Desktop or a folder you have created for using in this workshop.
132132

133133
:::::::::::::::::::::::::
134134

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

0 commit comments

Comments
 (0)