#imagemagick
Explore tagged Tumblr posts
beverage2000 · 1 year ago
Text
Tumblr media
old animation gif that got weirdly corrupted while shrinking
412 notes · View notes
vlkphoto · 3 months ago
Text
Tumblr media
Susquehanna to the Chesapeake
The Susquehanna river winds down to the distant Chesapeake from just south of Harrisburg, PA.
To perceive depth, cross eyes and superpose left image seen with right eye over right image seen with left eye.
14 notes · View notes
brightgreendandelions · 1 year ago
Text
Tumblr media
this looks somewhat uncanny... i feel like i'm using the wrong Impact font
48 notes · View notes
speedschootre · 1 month ago
Text
Tumblr media
3 notes · View notes
throudin · 27 days ago
Text
Shared some images for a comm form by using ImageMagick to convert them to PDF pages, and it feels like the perfect way to share multiple images in one file. Did end up learning image DPI properties affect how large their pages appear, which was interesting, but simple to fix in GIMP.
0 notes
jkresearch · 27 days ago
Link
0 notes
arbtttrn6 · 2 months ago
Text
[RU] Обновил тут свою заметку о том, как массив изображений различного соотношения сторон сконвертовать в bmp для wad'ов для goldsrc с сохранением соотношения сторон с помощью Imagemagick.
-[1]: https://arbtttrn6.neocities.org/ru_massovo-preobrazovatj-izobrazhenija-v-bmp-dlja-goldsrc-half-life
0 notes
ultranurd · 6 months ago
Text
Installing PHP ImageMagick on Amazon Linux 2023
WordPress has been yelling at me for a while that I don’t have the PHP module imagick installed. When I moved to an updated server running AL2023 and PHP 8, I lost it. As it turns out the reason is that the package isn’t included, and that hasn’t changed since 2022. Mildly annoying! I found a re:Post guide (thanks Mike Lim!) on setting up PHP modules and followed that with some slight…
0 notes
frankslin · 6 months ago
Text
作弊条:将不规则尺寸的图片转换成信纸大小的 PDF
在日常文档处理中,我们时常会遇到需要将不规则尺寸的 PDF 文件调整为北美标准信纸大小(8.5英寸 x 11英寸)的需求,特别是在处理原始扫描的 PDF 时。本文将介绍如何借助 ImageMagick 和 GhostScript 软件来完成此转换,并确保文件保持较小的体积和清晰的质量。
本文假定输入的文件名为 input.pdf,只有 1 页,四边已 crop 好,文字内容周围留有足够的空白、无需进一步调整,直接缩放不会显著影响质量。
具体步骤
1. 将 PDF 转换成无损格式的高分辨率 TIFF 图片
使用以下命令将 PDF 文件转换为 300 DPI 的 TIFF 格式:
$ convert input.pdf -density 300 -resize 2550x3300 temp.tiff
此命令生成的 temp.tiff 文件尺寸最大为 2550x3300。其中,“宽为 2550 像素”及“高为 3300 像素”两个条件至少满足一条。将原始 PDF 转换为精度为 300 DPI 的无损 TIFF 图片格式,对于大部分印刷文本、图片需求,已足够清晰,并避免压缩过程中图像质量的损��。
2. 将调整好尺寸的 TIFF 图片转换成 PDF
$ convert temp.tiff -gravity north -extent 2550x3300 output.pdf
其中,-gravity north 使文件顶部对齐。也可以选择其他方向(northwest、center 较为常用)。-extent 参数补足 PDF 尺寸,原文件缺失的部分,默认以白色补足。
3. 压缩 PDF 文件
第二步生成的 PDF 文件尺寸较大(约 20MB),不便于传输、应用。可用 GhostScript 工具重新采样、压缩。
$ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output_compressed.pdf output.pdf
其中 PDFSETTINGS 可选的参数有:
/screen: 72 DPI
/ebook: 150 DPI
/printer: 300 DPI
/prepress: 高分辨率并且包含色彩信息
/default: 默认,效果介于 /screen 和 /printer 之间。
此步骤结束后输出的文件 output_compressed.pdf 即符合打印要求的文档。如果 PDF 内容以黑白文字为主,大小应在 1MB 以内。
注 1:如希望修改 ImageMagick 生成的 PDF 中的默认 metadata,可以这样操作:
首先建立一个名为 metadata.pdfmark 的文本文件,参考内容如下:(请适当修改)
[ /Title (Frank's Very Important Document) /Author (Frank Lin) /Subject (Frank's experiments with pdfmark) /Creator (https://linshuang.info/) /ModDate (D:20241101000000+01'00') /Producer (A 'pdfmark' trick with Ghostscript) /Keywords (Metadata, Ghostscript, PDF) /CreationDate (D:20241101000000+01'00') /DOCINFO pdfmark
(注意,文件末尾是“pdfmark”,不能以 ] 关闭)
将第三步中的 gs 命令后面增加一输入文件,即可覆盖 output.pdf 中的 metadata。
$ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output_compressed.pdf output.pdf
生成的文件在 Chrome 中看起来是这样的:
Tumblr media
注 2:对于多页的 PDF,可写脚本对每页内容按类似方法处理,具体步骤从略。
0 notes
saiita · 2 years ago
Text
免费的图片转换软件
以下是一些当时免费的图片转换软件。请注意,这些信息可能已经过时,���议您在使用任何软件之前查看最新的信息和评价。 ImageMagick: ImageMagick是一个开源的命令行工具,可以用于处理和转换图片格式。虽然它主要是一个命令行工具,但也有许多基于图形界面的前端可以使用。 XnConvert: XnConvert是一个免费的批量图片处理工具,它支持多种格式的转换、大小调整、滤镜应用等功能。 IrfanView: IrfanView 是一个小巧且功能强大的图片浏览和编辑工具,它也可以进行批量格式转换。 GIMP: GIMP(GNU Image Manipulation Program)是一个功能丰富的免费图像编辑软件,虽然主要用于图像编辑,但它也可以进行格式转换。 FastStone Image Viewer:…
Tumblr media
View On WordPress
0 notes
pulipuli · 2 years ago
Photo
Tumblr media
看看網頁版全文 ⇨ 依據圖片有沒有透明的狀態決定剪裁方式 / Trimming Image based on Alpha Channel https://blog.pulipuli.info/2023/04/blog-post_470.html 之前在「剪裁圖片的白色邊緣,但保留物件的白色」那篇有提到,如果圖片本身就有透明的部分,原本的做法會讓圖片內的透明變成白色。 要怎麼改它好呢?。 ---- # 裁切多餘的透明 / Trim transparent parts of an image。 先來張圖。 這張圖的周圍跟頭髮內部都有透明的部分了,讓我們拉大來看看。 可以���到袖子下方是透明的。 但是它的周圍有多餘的透明區域。 要怎麼把它裁掉呢?。 ## 原本的做法 / Previous command。 如果是用「白色背景變透明,但是保留物件的白色」這篇的做法,那用以下指令裁切的結果,會讓中間的透明區域變成白色:。 [Code...] 周圍多餘的透明區域是裁掉了沒錯。 但是中間的透明區域變成白色了。 ## 正確的指令 / Correct command。 在這個例子中,我們只需要將圖片周圍的透明裁掉即可。 用ImageMagick的「-trim」可以輕鬆做到這件事情:。 [Code...] 裁切結果如上圖所示,可以看到透明的區域只剩下物件本身了。 當然,袖子下面的透明區域依然是保留的。 因此結合上述的用法,我們就要在圖片沒有透明區域的情況下、或是圖片有透明區域的情況下,各別採用不同的做法。 # 判斷圖片有沒有透明的區域 / Detect alpha channel of an image。 https://stackoverflow.com/a/2581516。 ImageMagick提供了可以偵測圖片通道的工具,叫做「identify」。 感謝msw的說明,用identify偵測通道的做法如下:。 [Code...] 用這張圖片做分析,結果會是「srgba」。 其中的a表示透明通道。 用這張圖片做分析,結果會是「srgb」。 沒有a,表示這張圖片沒有透明的部分。 因此我們就可以用有沒有「a」來判斷要用那個指令了。 # Docker App https://github.com/pulipulichen/docker-app-Image-Trim。 這段整合我已經寫在docker-app-Image-Trim裡面了,直接用即可。 ---- 文章最後的問題是:你通常需要裁剪那些圖片呢?。 在留言舉個例子吧! ---- 看看網頁版全文 ⇨ 依據圖片有沒有透明的狀態決定剪裁方式 / Trimming Image based on Alpha Channel https://blog.pulipuli.info/2023/04/blog-post_470.html
0 notes
polyphonetic · 1 year ago
Text
For some reference on how I did it!
https://m.mediawiki.org/wiki/Manual:Installing_MediaWiki
The above was the main tutorial I used! The main parts for me was installing XAMPP, using Apache through the XAMPP console, and then separately using MariaDB *instead of* MySQL (which is in the XAMPP console). When creating the database in MariaDB, use the collation "utf8mb4_unicode_520_ci" instead.
https://m.mediawiki.org/wiki/Manual:Installing_MediaWiki_on_XAMPP
https://m.mediawiki.org/wiki/Manual:MariaDB
tutorial for XAMPP setup and ImageMagick [note that this uses XAMPP's MySQL, my process used MariaDB]:
https://youtube.com/watch?v=PoL_XxhsYRo
For APCu (which is related to caching and speeding up browsing), in XAMPP's php.ini file you'll want to make sure to have 'extension=apcu'. The below page was a big help on making sure you're using the right version, especially the top comment. that phpinfo() command part just literally make a text file with it, save as .php file through like notepad or notepad++, put it in your main folder for your wiki, open localhost to it
https://www.php.net/manual/en/book.apcu.php
Essentially when you get to the "installing the wiki" step, I tried to have ImageMagick and APCu ready and set up and showing that they're installed. I also looked into installing diff3 and File, but you do it after installation of your server when the LocalSettings.php has been created. Info is for some reason
https://m.mediawiki.org/wiki/Manual:Installing_MediaWiki_on_Windows_Server_2008_R2#GNU_diff3_Installation_.28Optional.29
This was a two-day project for me so don't fret if it takes a while to figure out. I hope though that this collection of links expedites the "googling around figuring out what the fuck anything is" stage.
There are many cool extensions you can do with MediaWiki and you can create a forum or a blog on it or just use it for whatever! I just think it feels so cool. Look around at other wikis to see how their CSS is done
MediaWiki:Common.css
https://m.mediawiki.org/wiki/Manual:CSS
https://en.touhouwiki.net/wiki/Touhou_Wiki
https://en.touhouwiki.net/wiki/MediaWiki:Common.css
https://wiki.puella-magi.net/Main_Page
https://wiki.puella-magi.net/MediaWiki:Common.css
YIPPEE I figured out how to host a WIKI on my COMPUTER with PHP and SQL!!!! I am gonna put so much world-building lore in this thing once I figure out some CSS
I can't say anything about the project but aaaaah I am. Excited. I have been wiggling this story concept in my head for like 4 years and am ready to spew them onto my computer much like raw unprocessed ore
45 notes · View notes
vlkphoto · 1 year ago
Text
Tumblr media
Geology ascendant
These rock formations in St.Mary's Island share a heritage with Madagascar. They were torn apart when the Indian subcontinent raced off to slam into Tibet. Malpe, KA.
To perceive depth, cross eyes and superpose left image viewed with right eye over right image viewed with left eye. The brain will do the rest.
4 notes · View notes
speedschootre · 1 month ago
Text
Tumblr media
2 notes · View notes
superchlorine · 2 years ago
Text
who knew making gifs would involve writing so much code 😵‍💫
7 notes · View notes
brightgreendandelions · 2 years ago
Text
are you sure your images aren't all webps or something?
i remember having to use imagemagick and termux on my phone to convert a webp screenshot into a png, so tumblr will accept it
i think it was for this post
why isn't the tumblr app letting me post images
like, the menu for it will pop up, but none of the pictures are there
5 notes · View notes