{ "metadata": { "name": "", "signature": "sha256:093fa6a56eb48349aa370e9987e263606086400160ed13006f963ccae6dfa6cc" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Compare data of png and tiff" ] }, { "cell_type": "code", "collapsed": false, "input": [ "%run ../common.ipynb\n", "image = imread('mp.tif')\n", "imsave('mp.png', image)\n", "png_image = ndimage.imread('mp.png')" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Populating the interactive namespace from numpy and matplotlib\n" ] } ], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "np.all(image == png_image)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 2, "text": [ "True" ] } ], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "!du -h mp.tif mp.png" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "5.7M\tmp.tif\r\n", "1.6M\tmp.png\r\n" ] } ], "prompt_number": 3 } ], "metadata": {} } ] }