{
"metadata": {
"name": "ipythonblocks_imagegrid"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"ipythonblocks.ImageGrid
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To learn more about `ipythonblocks` visit the homepage at [https://github.com/jiffyclub/ipythonblocks](https://github.com/jiffyclub/ipythonblocks).\n",
"\n",
"`ImageGrid` is a class that imitates image manipulation libraries like [PIL](http://www.pythonware.com/products/pil/).\n",
"Key differences from `BlockGrid` are:\n",
"\n",
"* Only 2D indexing is supported\n",
"* Indices are [column, row]\n",
"* Grid units are `Pixel` objects, which have `.x` (column) and `.y` (row) attributes\n",
"* Grid origin defaults to the lower-left corner, but can be set to the upper-left"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from ipythonblocks import ImageGrid"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"grid = ImageGrid(10, 10, fill=(124, 124, 124), block_size=15)\n",
"grid"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"