def test_create_from_template(): with TempFile('.xcf') as original, TempFile('.xcf') as created: original_file = GimpFile(original).create( 'Background', np.zeros(shape=(3, 2), dtype=np.uint8)) created_file = GimpFile(created).create_from_template(original_file) assert [] == created_file.layer_names() assert (2, 3) == created_file.dimensions()
def test_create_empty(): with TempFile('.xcf') as f: gimp_file = GimpFile(f).create_empty(3, 2, GimpFileType.RGB) assert (3, 2) == gimp_file.dimensions() assert [] == gimp_file.layer_names()