Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the watermarking code and endpoint #5353

Merged
merged 5 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions api/Dockerfile
dhruvkb marked this conversation as resolved.
Show resolved Hide resolved
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
Loading