SAORI for UKAGAKA. Convert a image file to resized png file.

Overview

Resized Png

GitHub repository

これは何?

デスクトップマスコット、「伺か」で使用できるSAORIの一種です。

機能としては、指定した画像ファイルを拡大または縮小し、pngとして出力します。

「伺か」「SAORI」等の用語については詳しく説明いたしませんのでご了承下さい。

使い方

SAORI自体の使い方は、使用するSHIORIなどによって異なりますので、ご自身でお調べ下さい。

ここではこのSAORIの使い方について説明いたします。

Argument0に、使用する機能名を指定して使用します。 指定できる機能はGetImageTypeToResizedPngです。

GetImageType

  • Argument1: 判別するファイルのパス

  • Result: 画像形式を表す文字列

指定されたファイルの画像形式を返します。 画像でない、または対応していない画像はUNKNOWNが返ります。

対応している形式は以下(色深度などによっては、対応していない場合があります):

  • AVIF
  • BMP
  • DDS
  • FARBFELD
  • GIF
  • HDR
  • ICO
  • JPEG
  • OPENEXR
  • PNG
  • PNM
  • TGA
  • TIFF
  • WEBP

ToResizedPng

  • Argument1: 入力するファイルのパス

  • Argument2: 出力するファイルのパス

  • Argument3: 出力する画像の横幅の数値

  • Argument4: 出力する画像の縦幅の数値

  • Result: エラーコードの数値(下記参照)

入力された画像を拡大または縮小して、pngとして出力します。 何か問題があった場合は、Resultに0以外が入ります。

横幅と縦幅は、負の数を指定すると、もう片方の拡大縮小率に基づいて自動で値が決まります (両方負の数にすると、何もせずに終了します)。 また、0を指定すると入力された画像の値を使用します。

エラーコード

  1. 正常終了
  2. 対応していない形式だった
  3. ファイルが見つからなかった
  4. 入出力に問題があった
  5. 画像のデコードに問題があった
  6. 画像のエンコードに問題があった
  7. 画像のパラメータに問題があった
  8. 画像の大きさが限界値を越えていた
  9. 画像サイズが小さすぎた

使用ライブラリ

いずれも敬称略。ありがとうございます。

ライセンス

MITにて配布いたします。

作成者

月波 清火 (tukinami seika)

GitHub

You might also like...
My own image file format created for fun! Install the "hif_opener.exe" to open hif files. clone the repo and compile to make your own hif file

Why am i creating this? I wanted to create my own image format since I was 12 years old using Windows 7, tryna modify GTA San Andreas. That day, when

Command line tool to convert env variables beginning with user to a htpasswd file

envhtp This command line tool converts environment variables whose keys start with "user_" into htpasswd compatible username/password pairs. The goal

A simple (but really fast!) CLI tool to convert an epub into a text file.

epub_to_txt A simple (but really fast!) CLI tool written in Rust to convert an epub into a text file (in Markdown format). Usage epub_to_txt filename.

Blazingly Rapid Uncompressed Harebrained Image File Format.
Blazingly Rapid Uncompressed Harebrained Image File Format.

BRUHIFF Blazingly rapid uncompressed harebrained Image File Format. Also known as BRUHIFF or BRUH. How to Download the repo / git clone it. Open a com

RBTC is cli to convert BTC to any currency and vice-versa.
RBTC is cli to convert BTC to any currency and vice-versa.

RBTC RBTC is cli to convert BTC to any currency and vice-versa. Building for source For build the binary just: $ cargo build To run as debug, just run

CLI tool to convert numbers from one base to another

changebase A CLI tool for changing the base of numbers. changebase -h numeric base converter USAGE: changebase [FLAGS] [OPTIONS] value FLAG

Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and at compile-time.
Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and at compile-time.

rgb2ansi256 rgb2ansi256 is a small Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and const fn. Th

This is a simple command line application to convert bibtex to json written in Rust and Python

bibtex-to-json This is a simple command line application to convert bibtex to json written in Rust and Python. Why? To enable you to convert very big

hj is a command line tool to convert HTTP/1-style text into JSON

hj hj is a command line tool to convert HTTP/1-style text into JSON. This command is inspired by yusukebe/rj, which is a standalone HTTP client that s

Releases(v1.0.2)
Owner
月波 清火
月波 清火
Save image from your clipboard 📋 as an image file directly from your command line! 🔥

Clpy ?? Save copied image from clipboard as an image file directly from your command line! Note It works only on windows as of now. I'll be adding sup

Piyush Suthar 13 Nov 28, 2022
CLI tool to convert image files.

?? F1sh CLI tool to convert image files. ??️ Supported formats File Supported AviF ✅ BMP ✅ DDS ✅ Farbfeld ✅ GIF ✅ HEIF ❌ ICO ✅ JPEG ✅ OpenEXR ✅ PNG ✅

Sammwy 5 Apr 3, 2023
Conference Monitoring Project based on Image Recognition that uses Rust Language and AWS Rekognition service to get the level of image similarity.

Conference Monitoring System based on Image Recognition in Rust This is a Conference Monitoring Project based on Image Recognition that uses Rust Lang

Pankaj Chaudhary 6 Dec 18, 2022
Replace an app's icon from a png with a single terminal script. Made with Rust

Replace macOS App Icon Replace an app's icon from a png with a single terminal CLI. Made with Rust

Kunal Bagaria 8 Aug 3, 2022
PNG manipulation library.

pngmanip A simple rust library for parsing and manipulating PNG images, primarily at the chunk level. The intended use case was for solving PNG based

Sam Leonard 1 Jan 7, 2022
png_defringe_rs is a port of Immorpher's PNG Defringe program written in Rust to achieve easier installation and faster performance.

png_defringe_rs png_defringe_rs is a port of Immorpher's PNG Defringe program written in Rust to achieve easier installation and faster performance. U

null 2 Nov 17, 2022
PlandUML and Drawio diagrams in doc comments as PNG or SVG images.

rsdoc This crate provides a procedural macro that transform PlandUML and Drawio diagrams in doc comments as PNG or SVG images. The diagrams in doc com

null 4 Feb 20, 2023
Rust low-level minimalist APNG writer and PNG reader with just a few dependencies with all possible formats coverage (including HDR).

project Wiki https://github.com/js29a/micro_png/wiki at glance use micro_png::*; fn main() { // load an image let image = read_png("tmp/test.

jacek SQ6KBQ 8 Aug 30, 2023
An mdBook backend to output Typst markup, pdf, png, or svg

mdbook-typst mdbook-typst is a backend for mdBook. The backend converts the book to Typst markup and can output any format Typst can (currently pdf, p

Christian Legnitto 18 Dec 16, 2023
A command-line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the returned URL.

Pup A command line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the return

SteveLau 11 Aug 17, 2022