Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

io.imsave 16 bit

import numpy as np
from skimage import io, exposure, img_as_uint, img_as_float

io.use_plugin('freeimage')

im = np.array([[1., 2.], [3., 4.]], dtype='float64')
im = exposure.rescale_intensity(im, out_range='float')
im = img_as_uint(im)

io.imsave('test_16bit.png', im)
im2 = io.imread('test_16bit.png')
Comment

PREVIOUS NEXT
Code Example
Python :: python-wordpress-xmlrpc get post id 
Python :: Python program to read a random line from a file. 
Python :: ldap python how to print entries 
Python :: python numpy read from stdin 
Python :: how to iclude parcentage in pivot table in pandas 
Python :: python print functoin 
Python :: np.modf 
Python :: sqlalchemy create engine SQLite Absolute 
Python :: Reading from a file way01 
Python :: iloc[ ] slicing 
Python :: Python Reloading a module 
Python :: clear-all-widgets-in-a-layout-in-pyqt 
Python :: Python match.start(), match.end() 
Python :: python zahl abrunden 
Python :: In interactive mode, the last printed expression is assigned to the variable _ 
Python :: do function for each 10sec with pyside2 
Python :: python check if array alternating 
Python :: pypy tinytag 
Python :: set layer start and end time arcpy 
Python :: how to select the three highest entries within a category in pandas 
Python :: set DJANGO_SETTINGS_MODULE=mysite.settings django-admin 
Python :: hashing algorithms in python 
Python :: calculate sin cos tan python 
Python :: pyaudio get system audio 
Python :: pytorch plot batch 
Python :: pyqt qwidget background color 
Python :: pandas python multiindex 
Python :: get_string python 
Python :: python print list in dictionary 
Python :: django test postgres extensions intarray 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =