"Round 2: Trying the same thing but with tifffile and doing grayscale"
"Round 2: Trying the same thing but with tifffile and doing grayscale\n",
"Conclusion: The documentation was terrible. It advertizes compression but doesn't say how it's done, and the specifics of it. Moving on to something else, but still worth a shot."
]
},
{
"cell_type": "code",
"execution_count": 71,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<PIL.TiffImagePlugin.TiffImageFile image mode=I;16B size=640x513 at 0x7F3520192160>\n"
]
}
],
"source": [
"scenes = file_extractor()\n",
"images = image_extractor(scenes)\n",
"first_source = images[0]\n",
"picture = Image.open(first_source)\n",
"print(picture.size)"
]
},
{
"cell_type": "code",
"execution_count": 68,
"metadata": {},
"outputs": [],
"source": [
"import tifffile"
]
},
{
"cell_type": "code",
"execution_count": 72,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[ 2 1 54668 ... 65535 65535 65535]\n",
" [22275 22292 22292 ... 22280 22212 22270]\n",
" [22303 22301 22298 ... 22254 22248 22262]\n",
" ...\n",
" [21832 21820 21844 ... 21892 21852 21845]\n",
" [21843 21821 21830 ... 21870 21865 21864]\n",
" [21836 21829 21840 ... 21858 21857 21860]]\n"
]
}
],
"source": [
"otherpic = tifffile.imread(first_source)\n",
"print(otherpic)"
]
]
},
},
{
{
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"Round 3: Trying numcompress, something that compresses numbers. Should provide an ok benchmark, and is actually documented."