Skip to content

Commit 341f7a4

Browse files
authored
Merge pull request #217 from CaptainSifff/gh-pages
Fix issue #58 : Add PNG to the mix
2 parents df0c8f9 + cb63911 commit 341f7a4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

episodes/02-image-basics.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,9 @@ plt.imshow(three_colours,cmap=plt.cm.gray)
390390
391391
Above we have exactly the same underying data matrix, but in greyscale.
392392
Zero maps to black, 255 maps to white, and 128 maps to medium grey.
393+
Here we only have a single channel in the data and utilize a grayscale color map
394+
to represent the luminance, or intensity of the data and correspondingly
395+
this channel is referred to as the luminance channel.
393396
394397
## Even More Colours
395398
@@ -928,6 +931,12 @@ For example,if your images are stored in the cloud and therefore
928931
must be downloaded to your system before you use them,
929932
you may wish to use a compressed image format to speed up file transfer time.
930933
934+
## PNG
935+
936+
PNG images are well suited for storing diagrams. It uses a lossless compression and is hence often used
937+
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
938+
increase the compressability of the data. The filtered data is then compressed in the next step and written out to the disk.
939+
931940
## TIFF
932941
933942
TIFF images are popular with publishers, graphics designers, and photographers.

episodes/03-skimage-images.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ In this case, the `.tif` extension causes the image to be saved as a TIFF.
163163
> the dimensions we want the new image to have, `new_shape`.
164164
>
165165
> Image files on disk are normally stored as whole numbers for space efficiency,
166-
> but tranformations and other math operations often result in
166+
> but transformations and other math operations often result in
167167
> conversion to floating point numbers.
168168
> Using the `skimage.img_as_ubyte()` method converts it back to whole numbers
169169
> before we save it back to disk.

0 commit comments

Comments
 (0)