mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,5 Tsd.
aktive Profile

#imagemagick

0 Beiträge0 Beteiligte0 Beiträge heute

Ich mache heute nur noch Bürozeug, bevor ich morgen buckeln gehe. Das Wetter ist eh zu bescheiden um draußen am Haus weiter zu arbeiten.

Eigentlich möchte ich immernoch all meine Dokumente in #Paperless bringen, aber ich bin mit der Qualität der Scans zu unzufrieden. Aus irgendeinem Grund ist der 'Weiß-Ton' bei jedem Scan unterschiedlich, wie als müsste ich jedes mal einen Weißabgleich machen. Ich habe bereits schon mit #ImageMagick experimentiert, aber keine zuverlässige Ergebnisse bekommen.

I had a moment of inspiration and created #ggg take a look (still #experimental #foss software)

ggg: #guile #scheme #glyph #generator

codeberg.org/jjba23/ggg

Through #svg generation from #lisp we leverage a (wip) #dsl and apply some #math knowledge to build pixel perfect project #markdown / #org badges.

It also scripts #imagemagick to export to #png or #webp .

You can then use the svgs in your #codeberg (or #github) repository #readme for example.

I provide a #guix manifest in the repo

Antwortete Martin Seeger

@masek this output of any use?

$ convert IMG_2025-05-18-13420375.jpg -colors 2 +dither -type bilevel -define png:bit-depth=2 -define png:color-type=0 output.png
~/.../pictures/PokemonGO $ identify output.png output.png PNG 1472x2968 1472x2968+0+0 8-bit Grayscale Gray 4c 39147B 0.000u 0:00.002
~/.../pictures/PokemonGO $ file output.png output.png: PNG image data, 1472 x 2968, 2-bit grayscale, non-interlaced

oddly enough #imagemagick seems to think it's 8-bit while file thinks 2-bit?

Probably solved, see below

Request for #followerpower

How do I get #imagemagick to create an output as 1bit image (PNG or BMP)?

I tried "-depth 1" and "-monochrom" and similar things, but it always creares an image with 3*8bit depth.

My current command line is:

magick -background white -fill black -font Arial -size 800x400 -pointsize 96 -depth 1 -monochrome "label:This is a test" test.bmp

Update:

Order matters. If the "label" is behind "-depth 1" it ruins it. Thanks for all replies.

magick -background white -size 800x400 -fill black -font Arial "label:Das ist ein Test" -depth 1 -monochrome demo.bmp ; magick identify demo.bmp

demo.bmp BMP 800x400 800x400+0+0 1-bit sRGB 2c 40130B 0.000u 0:00.000

Update 2:

It is still not displaying an image, but I think I am getting there. I only have one try per refresh every 15min.

Update 3:

Sometimes it pays of to check the documentation more carefully: docs.usetrmnl.com/go/imagemagi

In 10min I will see if it works. Looks like "-strip" is also important.

docs.usetrmnl.comImageMagick Guide | TRMNL API

Keine Ahnung warum, aber auf meinem Ubuntu-Server, einst mit Ubuntu 22.04 aufgesetzt und dann auf 24.04.01 aktualisiert, waren immer noch die PHP-8.3-Pakete von 22.04 installiert, die wurden offenbar beim Update vergessen.

Also erst einmal alle deinstalliert und dann neu installiert.

Nextcloud hatte sich beschwert, dass Imagemagick keine SVG-Unterstützung hat. Stellte sich heraus, dass php8.3-imagick exakt 0 Formate unterstützt hat.

Meine Vermutung war dann, dass imagemagick und php8.3-imagick nicht zusammenpassen – also habe ich geschaut, welche Version php8.3-imagick hat: 22.04. Dann stellte ich fest: Das ganze PHP 8.3 war noch auf 22.04...

Mit dem neu installierten PHP 8.3 klappt nun endlich alles...

#PHP83#Imagemagick#Nextcloud

Mir ist die Idee gekommen, dass man freie / kostenlose Bilder eventuell für die Auflockerung von Abenteuern nutzen kann. Bin mir noch unsicher, ob das gut funktioniert und auch gut wirkt.

Ich habe das mal an einem Quest ausprobiert. Die Seite ist mit #Typst, #ImageMagick und #Gimp gemacht.

Das Bild ist von: pixabay.com/de/photos/h%C3%BCt

Es fühlt sich noch zu wenig nach Fantasy an. Da muss ich auf jeden Fall nochmal andere Filter ausprobieren.

Remember the other day when I said I had developed a case of intermittent test?

Turns out, my code was outputting the same #PDF every time. The problem was in the test suite's use of #ImageMagick which for these PDF files, produces inconsistent results. YIKES!

Well at least it's not my fault. But it also might not be fixable by me.

convert test.pdf output.png