Skip to content

Commit

Permalink
fix: save images as PNG with full quality (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
conorsim authored Sep 18, 2024
1 parent b3a23ea commit 9653ec3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datadreamer/pipelines/generate_dataset_from_scratch.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,9 @@ def read_image_batch(image_batch, batch_num, batch_size):
image = Image.fromarray(image)
unique_id = uuid.uuid4().hex
image_path = os.path.join(
save_dir, f"image_{batch_num * batch_size + i}_{unique_id}.jpg"
save_dir, f"image_{batch_num * batch_size + i}_{unique_id}.png"
)
image.save(image_path)
image.save(image_path, quality=100)
images.append(image)
batch_image_paths.append(image_path)

Expand Down

0 comments on commit 9653ec3

Please sign in to comment.