Quite OK Image (QOI) format encoder/decoder

Related tags

Miscellaneous qoi-ci
Overview

This project implements encoding and decoding the "Quite OK Image" (QOI) format in the Ć programming language. Ć can be automatically translated to pure C, C++, C#, Java, JavaScript, Python and Swift with no additional dependencies.

Included are plugins for:

License

This code is licensed under the standard MIT license.

Copyright (C) 2021 Piotr Fusik

Issues
  • paint.net fails to save the .qoi image

    paint.net fails to save the .qoi image

    I don't know if this is a problem with the extension or with paint.net itself, but I presume it's the former.

    When I try to save a .qoi image in paint.net, I get an error. I attach an error log to this post.

    Error log qoi.txt

    opened by gezawatt 3
  • Transpiled Python: index data type too small

    Transpiled Python: index data type too small

    This code to manage pixel indexes: https://github.com/pfusik/qoi-ci/blob/5ea8fd4a03c1b3ba4831f451e8c2b0eed63c5259/QOI.ci#L88

    transpiles into this Python code https://github.com/pfusik/qoi-ci/blob/5ea8fd4a03c1b3ba4831f451e8c2b0eed63c5259/transpiled/QOI.py#L57

    Notice the "i" type code, which is actually a 2-byte value: https://docs.python.org/3/library/array.html

    This causes a OverflowError: signed integer is greater than maximum error when encoding images with Alpha, in the form of AARRGGBB 32bit pixel values, here https://github.com/pfusik/qoi-ci/blob/5ea8fd4a03c1b3ba4831f451e8c2b0eed63c5259/transpiled/QOI.py#L83

    I think the correct code should use the "l" type code to get a 4-byte value. Using "l", I can successfully encode my image without error.

    opened by Kriechi 3
  • Gimp hangs if qoi file double-clicked in Windows 10

    Gimp hangs if qoi file double-clicked in Windows 10

    The plug-in works fine with gimp in windows 10 if a qoi file is opened from within gimp. I have specified gimp as the default application for qoi files. But if one attempts to open a qoi file by left-clicking on the file name (or right clicking and then selecting "open"), then gimp fails to open, with a blank windows console displayed instead.

    Initially I thought the problem might be that I was using an old version of gimp (2.10.04); at that point the "stuck" console window would display a missing fast-path babl conversion detected warning instead of being blank.

    Then I installed the latest version of gimp 2.10.30 and after doing that, both before and after reinstalling the qoi plug-in I get the blank console window if I left double-click (or right click and then selecting "open") on a qoi file. QOI files still open correctly if I open them from within gimp.

    opened by w3sz 2
  • XnViewMP fails to load or save QOI images with unicode filenames

    XnViewMP fails to load or save QOI images with unicode filenames

    Using both Save As and Batch Convert, no file is saved. Batch convert log:

    E:\第01話.bmp : loading
    E:\第01話.bmp 1920x1080x24 : loaded
    E:\第01話.qoi : not a picture
    
    Input files: 1
    Extracted pages: 1
    New files: 1
    
    Total Duration: 0 second(s)
    

    No problem converting same files to JPG in XnViewMP. No problem with Save As in XnViewMP if target filename is changed to non-unicode (e.g. latin alphanumeric only) in save dialog. No problem with Paint.net, but saved file with unicode filename cannot be loaded in XnViewMP, showing this message box:

    ---------------------------
    Error
    ---------------------------
    File can't be loaded!
    ---------------------------
    OK   
    ---------------------------
    
    opened by f2d 2
  • Unable to compile for GIMP on mac

    Unable to compile for GIMP on mac

    Trying to run make install-gimp on mac quickly fails with this output:

    cc -O2 -Wall -I transpiled `gimptool-2.0 --cflags` -o file-qoi file-qoi.c QOI-stdio.c transpiled/QOI.c -rpath @executable_path/../../../ -L /Applications/GIMP-2.10.app/Contents/Resources/lib -lgimpui-2.0.0 -lgimp-2.0.0 -lgegl-0.4.0 -lbabl-0.1.0 -lgobject-2.0.0
    Package gimpui-2.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gimpui-2.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gimpui-2.0' found
    No output from 'pkg-config --cflags gimpui-2.0'
    file-qoi.c:27:10: fatal error: 'libgimp/gimp.h' file not found
    #include <libgimp/gimp.h>
             ^~~~~~~~~~~~~~~~
    1 error generated.
    make: *** [file-qoi] Error 1
    

    Downloading gimp's source and copying the libgimp folder over produces this output:

    cc -O2 -Wall -I transpiled `gimptool-2.0 --cflags` -o file-qoi file-qoi.c QOI-stdio.c transpiled/QOI.c -rpath @executable_path/../../../ -L /Applications/GIMP-2.10.app/Contents/Resources/lib -lgimpui-2.0.0 -lgimp-2.0.0 -lgegl-0.4.0 -lbabl-0.1.0 -lgobject-2.0.0
    Package gimpui-2.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gimpui-2.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gimpui-2.0' found
    No output from 'pkg-config --cflags gimpui-2.0'
    file-qoi.c:27:10: error: 'libgimp/gimp.h' file not found with <angled> include; use "quotes" instead
    #include <libgimp/gimp.h>
             ^~~~~~~~~~~~~~~~
             "libgimp/gimp.h"
    In file included from file-qoi.c:27:
    ./libgimp/gimp.h:24:10: fatal error: 'cairo.h' file not found
    #include <cairo.h>
             ^~~~~~~~~
    2 errors generated.
    make: *** [file-qoi] Error 1
    

    I can place quotes around libgimp/gimp.h and libgimp/gimpui.h, however that still does not fix 'cairo.h' file not found I have also verified that cairo has already been installed via both homebrew and macports

    opened by FrostBird347 5
  • "Uncompressed" in XnView MP's label variables

    XnViewMP_Uncompressed_QOI

    It can say if a PNG is ZIP-compressed or not, state RLE compression where possible, etc. It also says that a JPEG is "JPEG"-compressed.

    QOI should probably be "QOI"-compressed too, even if AFAIK a file entirely made of RGB(A) codes is valid, and probably a little slower to read than a BMP. Nothing about this can be said from its header though.

    I don't know if plugins have any say in this or it's entirely at XnView(MP)'s discretion.

    If it can be stated from plugin, then it would be nice to add opcode types found after reading the file and generating the thumbnail. For example, "RLE", "Diff/Index/RLE", or actually "Uncompressed" if the whole file is only RGB(A) codes.

    opened by f2d 1
  • XnViewMP always saves RGB 24-bit QOI images

    XnViewMP always saves RGB 24-bit QOI images

    Hi. I installed qoi-ci-1.1.1 plugin for all supported programs.

    XnViewMP, using both Save As and Batch Convert, always saves RGB 24-bit QOI images from 24/32-bit sources. No options/settings were possible to change in saving. No image modification actions were used in batch conversion.

    Also, conversion fails from paletted 8-bit PNG images (and possibly other limited formats). It skips such files, which may be overlooked in large batch. User must explicitly add changing color depth to 24/32 to succeed. I think I had this problem not only with saving QOI, not sure. It may be XnViewMP's own bug, but worth mentioning anyway.

    Paint.net and GIMP are OK with the same plugin version 1.1.1. Saved image is always 32-bit with RGBA header mark, regardless of alpha content and without possible user choice. Which is fine, at least being lossless and nothing to waste (unlike BMP/PNG with alpha channel).

    opened by f2d 1
Releases(qoi-ci-1.1.1)
Owner
Piotr Fusik
Piotr Fusik
conversion from absolute encoder and incremental encoder, control two robotis dynamixel motors, testing qserialport library in qt

Q_dxl This example is created for testing: Serial connection Testing two dynamixel motors (eg. MX-28AT) Doing the conversion from absolute encoder (of

ibov 1 Oct 30, 2021
Minimalist protocol buffer decoder and encoder in C++

protozero Minimalistic protocol buffer decoder and encoder in C++. Designed for high performance. Suitable for writing zero copy parsers and encoders

Mapbox 217 Jun 28, 2022
The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.

OpenEXR OpenEXR provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the mot

Academy Software Foundation 1.2k Jun 27, 2022
Quite powerful window manager for X

qpwm quite powerful window manager for X It's small floating window manager from not a programmer ?? Some features ?? Floating only. Fullscreen toggle

unxsh 71 Jun 27, 2022
(Simple String Format) is an syntax of format and a library for parse this.

SSFMT (Simple String Format) is an syntax of format and a library for parse this. SSFMT != {fmt} SSFMT is NOT an API/library for parse {fmt} syntax !

null 2 Jan 30, 2022
Arduino code to interface with quadrature-encoder mice, specifically the Depraz mouse

Depraz Mice on USB via Arduino This code lets you connect a Depraz mouse to a modern computer via USB. The Depraz mouse has a male DE-9 connector but

John Floren 4 Jan 7, 2022
Cheap 3D Printed Absolute Encoder Knob

A cheap, 3D printed absolute position encoder knob based on a low-cost AS5600 breakout module. Demo firmware using a TTGO T-Display ESP32 board is pro

Scott Bezek 138 Jun 23, 2022
PHP Encoder, protect PHP scripts in PHP 8 and PHP 7, High Performance, Compitable with X86_64, MIPS, ARM platform and Ubuntu/Centos/OpenWRT system.

What's FRICC2? FRICC2 is a PHP Script encryption tool. When you are developing a commercial software using PHP, the script can be distributed as encry

Hoowa Sun 29 May 19, 2022
QuadratureDecoder - PIO based Encoder Library for the RP2040

QuadratureDecoder - PIO based Encoder Library for the RP2040 Overview The QuadratureDecoder C++ class can be used to count quadrature encoder signal t

Adam Green 10 Jun 2, 2022
Turing-ring is a simple Turing Machine using just a Nano, a NeoPixel ring and a rotary encoder+push-button The ring is the tape and the UI.

Turing-ring Turing-ring is a simple Turing Machine using just a Nano, a NeoPixel ring and a rotary encoder+push-button The ring is the tape and the UI

Mark Wilson 2 Dec 26, 2021
Fast single source file BC7/BPTC texture encoder with perceptual metric support

Note: Since this repo was created, we've released two new codecs with better BC7 encoders: https://github.com/richgel999/bc7enc_rdo https://github.com

Rich Geldreich 142 Apr 11, 2022
SleighCraft is a decoder based on ghidra's decompiler implementation.

SleighCraft is a decoder (or, linear disassembler) based on ghidra's decompiler implementation. Sleighcraft can be used in Rust or Python, with both high-level and low-level API.

PortalLab 229 Jun 23, 2022
Multichannel HFDL decoder

dumphfdl dumphfdl is a multichannel HFDL (High Frequency Data Link) decoder. HFDL (High Frequency Data Link) is a protocol used for radio communicatio

Tomasz Lemiech 72 May 25, 2022
Radiosonde decoder plugin for SDR++

Radiosonde decoder plugin for SDR++ Build instructions Download the SDR++ source code: git clone https://github.com/AlexandreRouma/SDRPlusPlus Open th

Davide Belloli 25 Jun 14, 2022
Browser and NodeJS Web Assembly audio decoder libraries that are highly optimized for size and performance.

WASM Audio Decoders WASM Audio Decoders is a collection of Web Assembly audio decoder libraries that are highly optimized for browser use. Each module

Ethan Halsall 53 May 30, 2022
Converts file formats supported by AdPlug to VGM format.

adlib2vgm Converts file formats supported by AdPlug to VGM format. Notice This tool is originally designed to work with the RetroWave OPL3 Sound Card.

SudoMaker 12 Feb 8, 2022
(R) Efficient methods and operators for the sparse matrix classes in 'Matrix' (esp. CSR format or "RsparseMatrix")

MatrixExtra MatrixExtra is an R package which extends the sparse matrix and sparse vector types in the Matrix package, particularly the CSR or Rsparse

null 13 Jun 20, 2022
A free, open-source compressor for the ZX0 format

salvador -- a fast, near-optimal compressor for the ZX0 format salvador is a command-line tool and a library that compresses bitstreams in the ZX0 for

Emmanuel Marty 28 Jun 7, 2022
Immersive IMM Format and Player

Introduction Immersive media (IMM) is an API-neutral runtime immersive media delivery format. IMM provides an efficient, extensible, interoperable for

null 35 Jun 23, 2022