Skip to content

Commit 2c49ce9

Browse files
committed
Change reshaping parameters to no longer require image transpose
1 parent 7692c0a commit 2c49ce9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rawtools/qualitycontrol.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,12 @@ def get_side_projection(args, fp):
263263
# Change the array from a byte sequence to a 2-D array with the same dimensions as the image
264264
try:
265265
logging.debug("Reshaping image")
266-
logging.debug(f"arr = arr.reshape([{z}, {x}])")
267-
arr = arr.reshape([z, x])
266+
logging.debug(f"arr = arr.reshape([{x}, {z}])")
267+
arr = arr.reshape([x, z])
268268
logging.debug(f"array_buffer = arr.tobytes()")
269269
array_buffer = arr.tobytes()
270-
logging.debug(f"pngImage = Image.new(\"I\", {arr.T.shape})")
271-
pngImage = Image.new("I", arr.T.shape)
270+
logging.debug(f"pngImage = Image.new(\"I\", {arr.shape})")
271+
pngImage = Image.new("I", arr.shape)
272272
logging.debug(f"pngImage.frombytes(array_buffer, 'raw', \"I;16\")")
273273
pngImage.frombytes(array_buffer, 'raw', "I;16")
274274
logging.debug(f"pngImage.save(ofp)")

0 commit comments

Comments
 (0)