mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

5.2K
active users

#webp

3 posts3 participants0 posts today
Replied in thread

@anselmschueler

I love it when people ask. XD

I am:

  1. Deeply nostalgic about the 16-bit era of computing and its graphic limitations
  2. Deeply concerned that I use as little of my instance admin's (admittedly ample) data storage as possible

So, I almost never post videos, and when I post pictures, I either post as very compressed #WebP (not my favorite image format, but it's the best format for low-fidelity/high-compression images that #GoToSocial supports), or "lossy"-compressed PNGs.

I have a utility on my phone (Image Toolbox) that can reduce PNG files by reducing the number of colors, but it's not great at picking the colors.

When I have the time and presence of mind to do so, I will take the PNG into GIMP and either use its conversion function to reduce the number of colors (to something like 32 or maybe 64, possibly as low as 4 or 8), or (like in the above case) I'll actually hand-select the important colors in the image and tell GIMP to reduce the image to just those colors.

In this case, the original screenshot PNG was 83KiB, which I managed to bring down to 16KiB through the manual color reduction process (down to just 6 colors).

If you peruse the #LossyPNG hashtag, there are plenty of examples. Some are obviously reduced (and are reminiscent of graphics on 16 bit machines like the #Amiga or #AtariST), but some look quite good for how severely reduced they were.

f-droid.orgImage Toolbox | F-Droid - Free and Open Source Android App RepositoryA powerful image editing app that allows you to crop, filter, convert, resize, c
Continued thread

I kinda love the fact that this 2k resolution photo looks like it was recorded on an ancient VHS tape at ESLP (extra super long play) speeds.

#WebP is horrible, and also amazing. 😁

And look, it's a TWO KAY image that takes up the same amount of space as the original macintosh's screenbuffer (512x342 mono)! 🤣

(Okay, 860 bytes more)

#WebP #котики #котэ #алгоритмы #сжатие #ФорматыФайлов #тест

WebP

Для тех, кому пока непонятно, зачем нужен этот ваш WebP. Типичный пример типичного скриншота: текст+картинка+много однородного фона.

  • PNG → 1,47 Мб
  • WebP → 128 Кб (lossy)
  • JPEG → 187 Кб

По второй картинке можно оценить, насколько мало артефактов привносит WebP при большем, чем у JPEG, сжатии (и более чем в 10 раз относительно PNG!).

Вторая картинка, есличо, занимает 97 килобайт в WebP lossless, при 207 и 205 в PNG / JPEG 🙂

Кроме размера (бе-е-е-е, интернеты быстрые, зачем экономить килоба-а-а-йт) большой плюс формата — поддержка прозрачности при обоих вариантах сжатия (с потерями и без). И даже анимация есть.

Поддержка реализована во всех браузерах старше 2020 года, просмотрщики и редакторы тоже умеют искаропки, ну или надо плагин/либу поставить. Даже Paint в #Windows10 — могёт 🙂

А еще он попенсорцный и одобрен котиками 🐱

No obvious results from web searches, so:

I'm creating an image gallery on a static HTML website. I take full resolution images (#webp, #png) from users and generate thumbnails and index pages with <figure> and <figcaption>. I am struggling with a good way to have users provide a caption of each image, because EXIF / XMP in modern formats has terrible tool support.

My current thinking is a csv file with filename and figcaption.

Have you implemented a better solution? If not, please boost.

#j_post_draft
#софт #Шиндошс #Windows10 #NeuralNetwork #script #автоматизация

Есть под венду хорошая, годная #скриншот​илка — ShareX. 100500 функций в совершенно инопланетном интерфейсе, но сохранять умеет только в PNG/JPEG (ну, BMP и TIFF тоже есть, но ненужно). И есть даже даже какие-то зайчатки автоматизации — возможность задать условие, дескать, если в #PNG получается больше 200 килобайт — то жми вместо этого в #JPEG...

Но мы ж люди современные, #WebP хотим. Внешний кодировщик там вызвать можно, но условия задать уже не получится. Поэтому #ChatGPT наваял такой батник:

@echo off
setlocal enabledelayedexpansion

set "input=%~1"
set "output=%~2"
set "cwebp=C:\programs\libwebp-1.4.0-windows-x64\bin\cwebp.exe"
set "magick=C:\programs\ImageMagick-7.1.1-Q16-HDRI\magick.exe"

:: 1. Конвертация PNG -> WebP без потерь
"%cwebp%" -lossless "%input%" -o "%output%"

:: 2. Получаем размер выходного .webp файла
for %%F in ("%output%") do set "size=%%~zF"
set /A size/=1024

:: 3. Если WebP > 200 Кб, пересжимаем с потерями
if %size% GTR 200 (
"%cwebp%" -q 80 "%input%" -o "%output%"
)

:: Конвертация PNG -> JPEG
:: Меняем расширение на .jpg
set "output=%input:.png=.jpg%"

:: Конвертация PNG -> JPEG
%magick% convert "%input%" -quality 80 -strip "%output%"

endlocal

Таким образом, на выходе получается 3 файла: PNG, WebP (с потерями или без), JPEG. Ссылку на батник указываем в «Настройках задач», и включаем выполнение «Задач» после захвата скриншота.

В буфер по умолчанию копируется путь к WEBP, а PNG и JPG лежат там же с тем же именем.

P.S. Я ХЗ, насколько подробно имеет смысл расписывать настройки (да, интерфейс по ходу проектировали Чужие для Хищников 😉 ), будут вопросы — спрашивайте (хех, если тут вообще есть ведузятники 😂 ).

P.P.S. Почему 200 килобайт? Потому что, как правило, скриншот всего экрана с окнами и текстом (т.е. хорошо сжимаемый без потерь) весит меньше. Если получается больше — значит там есть картинки, и можно с потерями жать. При этом качество WebP получается лучше при вдвое меньшем размере, в сравнении с JPEG.

Replied in thread

@_pear

One reason I use a pixelfed instance is so that I do not overwhelm my main instance's storage.

But lately I've taken to just hyper-compressing my images with WebP (and reducing them down to a maximum of 2048 pixels on either axis) instead of posting to PixelFed. ImagePipe is a great FOSS app for automating this.

For the record, I'd much rather use #AVIF over #WebP, but #GoToSocial doesn't support it yet.

I just updated my #MSDOS image viewer/converter #DosView

* Updated libjpeg to 9f.
* Updated libjasper to 4.2.4.
* Fixed a crash when running out of memory during loading/display.
* Fixed version number when running DosView.
* Added help overlay in view mode.
* Patched Allegro to support more BMP formats.
* Fixed DE LSM for FreeDOS.

github.com/SuperIlu/DosView/re

#RetroComputing
#jpeg #png #qoi #webp #bmp #tga #NetPBM #ras #tiff #jpeg2000 #pcx #FreeDOS #GIF #PSD #HDR #PIC

GitHubRelease v1.7 · SuperIlu/DosViewUpdated libjpeg to 9f. Updated libjasper to 4.2.4. Fixed a crash when running out of memory during loading/display. Fixed version number when running DosView. Added key to display help overlay in v...

If you're hosting Immich on a spare computer, using an old external disk drive, reduce your storage requirements by converting your Jpeg files to webp. Keep the .jpg extension too! You can probably get them down to about half the size of a Jpeg.

This is really only if you're exporting files from elsewhere to Immich. I export from Lightroom Classic. Don't ever go touch your original files!

for i in *.jpg
do
cwebp -metadata all "$i" -q 70 -m 6 -o out.tmp
mv out.tmp "$i"
done