Skip to content

Commit

Permalink
Output from actual compressed image
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescAlted committed Dec 4, 2023
1 parent ecb9afb commit fbdbc15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def compress(im, urlpath=None, **kwargs):
)
add_argument = parser.add_argument
add_argument('inputfile')
add_argument('--outputfile', type=str, help='File name from decompressed image')
add_argument('-o', '--outputfile', type=str, help='File name from decompressed image')
args = parser.parse_args()

kwargs = {'cod_format': blosc2_grok.GrkFileFmt.GRK_FMT_JP2,
Expand Down Expand Up @@ -90,6 +90,7 @@ def compress(im, urlpath=None, **kwargs):
if arr.ndim == 3:
arr = arr.transpose([1, 2, 0])
arr = arr.copy()
im = Image.fromarray(arr)
im.save(args.outputfile)

# print("Performing dB compression ...")
Expand Down

0 comments on commit fbdbc15

Please sign in to comment.