Skip to content

Commit

Permalink
Remove the watermarking code and endpoint (#5353)
Browse files Browse the repository at this point in the history
Co-authored-by: Krystle Salazar <[email protected]>
  • Loading branch information
dhruvkb and krysal authored Jan 24, 2025
1 parent 0fad9ae commit 9da4cba
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 547 deletions.
4 changes: 0 additions & 4 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ ENV PATH="/.venv/bin:$PATH"

WORKDIR /api

COPY api/utils/fonts/SourceSansPro-Bold.ttf /usr/share/fonts/truetype/SourceSansPro-Bold.ttf

# Copy virtualenv from the builder image
COPY --from=builder /.venv /.venv

Expand All @@ -69,15 +67,13 @@ ARG AUDIOWAVEFORM_RELEASE=1.10.1
ARG AUDIOWAVEFORM_DEB=audiowaveform_${AUDIOWAVEFORM_RELEASE}-1-12_${BUILDARCH}.deb

# - Install system packages needed for running Python dependencies
# - libexempi8: required for watermarking
# - Create directory for dumping API logs
# - apt --fix-broken install required to install missing dependencies for audiowaveform and audiowaveform itself
# dpkg -i marks the dependencies for installation, apt-get installs them
# we need to ignore error output from dpkg -i for this reason
RUN apt-get update \
&& apt-get install -yqq --no-install-recommends \
curl \
libexempi8 \
postgresql-client \
&& curl -sLO https://github.com/bbc/audiowaveform/releases/download/${AUDIOWAVEFORM_RELEASE}/${AUDIOWAVEFORM_DEB} \
&& (dpkg -i ${AUDIOWAVEFORM_DEB} || apt-get --fix-broken -y --no-install-recommends install) \
Expand Down
8 changes: 0 additions & 8 deletions api/api/docs/image_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,3 @@
},
eg=[image_oembed_curl],
)

watermark = extend_schema(
deprecated=True,
responses={
401: AuthenticationFailed,
404: NotFound,
},
)
11 changes: 0 additions & 11 deletions api/api/serializers/image_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,3 @@ def get_width(self, obj) -> int:

def get_height(self, obj) -> int:
return self.context.get("height", obj.height)


class WatermarkRequestSerializer(serializers.Serializer):
embed_metadata = serializers.BooleanField(
help_text="Whether to embed ccREL metadata via XMP.", default=True
)
watermark = serializers.BooleanField(
help_text="Whether to draw a frame around the image with attribution"
" text at the bottom.",
default=True,
)
78 changes: 0 additions & 78 deletions api/api/utils/ccrel.py

This file was deleted.

245 changes: 0 additions & 245 deletions api/api/utils/watermark.py

This file was deleted.

Loading

0 comments on commit 9da4cba

Please sign in to comment.