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

ETQ instructeur: nouveau filigrane des titres d'identité qui améliore la lisibilité des images #9470

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

colinux
Copy link
Member

@colinux colinux commented Sep 7, 2023

  • très largement inspiré de filigrane.beta.gouv.fr (multiples petites occurrences de texte en damier)
  • supprime WATERMARK_FILE pour utiliser APPLICATION_NAME à la place. La variable d'env WATERMARK_FILE et son fichier peuvent être supprimés.
  • adapté quelle que soit la taille et résolution de l'image
  • on devrait pouvoir s'en servir plus tard pour des pdf (transformés en image au préalable)
  • ✅ en préprod

Closes #9232

Exemples sur spécimens :

carte-identite-demo-2_watermarked

carte-identite-demo-1_watermarked

carte-identite-demo-3_watermarked

watermark-demo.mp4

AVANT

Capture d’écran 2023-09-07 à 19 22 31

@colinux colinux marked this pull request as draft September 7, 2023 17:25
@colinux colinux force-pushed the improve-watermark branch 9 times, most recently from 5072967 to ea29371 Compare September 11, 2023 13:35
@colinux colinux marked this pull request as ready for review September 11, 2023 13:41
Copy link
Member

@LeSim LeSim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c'est top

.github/workflows/ci.yml Show resolved Hide resolved
app/jobs/titre_identite_watermark_job.rb Outdated Show resolved Hide resolved
app/services/watermark_service.rb Outdated Show resolved Hide resolved

desc "Watermark demo. Usage: noglob rake pjs:watermark_demo[tmp/carte-identite-demo-1.jpg]"
task :watermark_demo, [:file_path] => :environment do |_t, args|
file = Pathname.new(args[:file_path])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
file = Pathname.new(args[:file_path])
file = File.new(args[:file_path])

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai gardé Pathname car pour ce qu'on en fait l'API est la même, et c'est beaucoup plus intuitif pour manipuler les extensions ici

@colinux colinux force-pushed the improve-watermark branch 2 times, most recently from 7604969 to e8104e7 Compare September 12, 2023 10:42
@colinux colinux added this pull request to the merge queue Sep 12, 2023
Merged via the queue into demarches-simplifiees:main with commit c9bde31 Sep 12, 2023
@colinux colinux deleted the improve-watermark branch September 12, 2023 12:20
@sentry-io
Copy link

sentry-io bot commented Sep 13, 2023

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ MiniMagick::Error: identify -format %[orientation] /tmp/ActiveStorage-69847366-20230919-1923667-ynn3ed.jpg[0] fail... TitreIdentiteWatermarkJob View Issue
  • ‼️ **MiniMagick::Error: convert /tmp/ActiveStorage-70319237-20230921-535949-p7zepw.JPG -pointsize 20 -kerning 1.2 -fill ...** TitreIdentiteWatermarkJob` View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: rendre le filigrane sur les titres identité plus transparent
2 participants