Skip to content

Fix issue #58 : Add PNG to the mix #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions _episodes/02-image-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ plt.imshow(three_colours,cmap=plt.cm.gray)

Above we have exactly the same underying data matrix, but in greyscale.
Zero maps to black, 255 maps to white, and 128 maps to medium grey.
Here we only have a single channel in the data and utilize a grayscale color map
to represent the luminance, or intensity of the data and correspondingly
this channel is referred to as the luminance channel.

## Even More Colours

Expand Down Expand Up @@ -928,6 +931,12 @@ For example,if your images are stored in the cloud and therefore
must be downloaded to your system before you use them,
you may wish to use a compressed image format to speed up file transfer time.

## PNG

PNG images are well suited for storing diagrams. It uses a lossless compression and is hence often used
in web applications for non-photographic images. The format is able to store RGB and plain luminance (single channel, without an associated color) data, among others. Image data is stored row-wise and then, per row, a simple filter, like taking the difference of adjacent pixels, can be applied to
increase the compressability of the data. The filtered data is then compressed in the next step and written out to the disk.

## TIFF

TIFF images are popular with publishers, graphics designers, and photographers.
Expand Down
2 changes: 1 addition & 1 deletion _episodes/03-skimage-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ In this case, the `.tif` extension causes the image to be saved as a TIFF.
> the dimensions we want the new image to have, `new_shape`.
>
> Image files on disk are normally stored as whole numbers for space efficiency,
> but tranformations and other math operations often result in
> but transformations and other math operations often result in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot!

> conversion to floating point numbers.
> Using the `skimage.img_as_ubyte()` method converts it back to whole numbers
> before we save it back to disk.
Expand Down