Skip to content

Commit

Permalink
Merge pull request #333 from W24-Service-GmbH/werk24/issue-332
Browse files Browse the repository at this point in the history
adds output_format to SheetAnonymizer
  • Loading branch information
werk24 authored Oct 21, 2024
2 parents 4dd80bc + e753923 commit e90997d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions werk24/models/ask.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ class W24AskSheetAnonymization(W24AskThumbnail):
to fill the pixels that are to be redacted. Currently
only grayscale is supported.
output_format (W24FileFormatThumbnail): Output format in
which to generate the anonymized sheet.
"""

ask_type: W24AskType = W24AskType.SHEET_ANONYMIZATION
Expand All @@ -288,6 +290,12 @@ class W24AskSheetAnonymization(W24AskThumbnail):

fill_color: Tuple[int, int, int] = (255, 255, 255)

output_format: W24FileFormatThumbnail = Field(
description="Output format in which to generate the anonymized sheet.",
examples=[W24FileFormatThumbnail.PNG, W24FileFormatThumbnail.PDF],
default=W24FileFormatThumbnail.PNG,
)


class W24AskPartFamilyCharacterization(W24Ask):
"""Triggers a post-processor that turns the raw data into a
Expand Down
2 changes: 1 addition & 1 deletion werk24/models/file_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class W24FileFormatThumbnail(str, Enum):
This can either be a JPEG or a PDF.
"""

PNG = "PNG"
JPEG = "JPEG"
PDF = "PDF"

Expand Down

0 comments on commit e90997d

Please sign in to comment.