The skippy-renderer Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The skippy-renderer Reference Manual

This is the skippy-renderer Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 05:52:04 2022 GMT+0.

Table of Contents


1 Introduction

SKIPPY/RENDERER

This is a GIF renderer for SKIPPY.

Reason

The issue of rendering a GIF file is that every single GIF frame can - for compression purposes - only update a single part of the resulting image. For instance, the first frame can be 100x100px, but the second frame can be 4x4 and only update a part that is 20px from the top and 84px from the left. The third frame can again be 40x40 and update a yet different part of the image, the fourth frame can reverse the effects of the third frame, etc., etc.. This is why, even if you have the GIF frames alone, it is non-trivial to get a series of 100x100 images ARGB that you can then convert e.g. into a video file.

SKIPPY-RENDERER is a library existing to solve this very problem. No matter what the original frames of the image look like, the RENDER function gives you a "decompressed" series of 100x100px ARGB frames that you can then e.g. encode into a different file format.

My personal use case for this library: converting GIF animations into another file format that required raw ARGB data for each frame.

Interface

The only exported function is RENDER which accepts a SKIPPY data stream and a BYTE-ORDER keyword argument that states the endianness of bytes in the resulting vector (ARGB or BGRA). It returns three values - a list of vectors containing ARGB data in row-major order, a list of integer values for frame delays in milliseconds, and a list containing three values: image width, image height and a boolean signifying if the GIF should loop.

CL-USER> (skippy:load-data-stream "~/Downloads/cat_picture.gif")
#<SKIPPY::DATA-STREAM geometry 100x100, 5 images {100D53C843}>
CL-USER> (skippy-renderer:render *)
(#(0 0 0 0 0 ...)
 ...)
(3 3 3 3 3)
(100 100 T)

License

MIT, or whatever the original SKIPPY is licensed under.


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 skippy-renderer

GIF renderer for SKIPPY

Author

Michał "phoe" Herda

License

MIT

Dependency

skippy (system).

Source

skippy-renderer.asd.

Child Component

skippy-renderer.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


3.1.1 skippy-renderer/skippy-renderer.asd

Source

skippy-renderer.asd.

Parent Component

skippy-renderer (system).

ASDF Systems

skippy-renderer.


3.1.2 skippy-renderer/skippy-renderer.lisp

Source

skippy-renderer.asd.

Parent Component

skippy-renderer (system).

Packages

skippy-renderer.

Public Interface

render (function).

Internals

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 skippy-renderer

Source

skippy-renderer.lisp.

Use List
  • common-lisp.
  • skippy.
Public Interface

render (function).

Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


5.1.1 Ordinary functions

Function: render (data-stream &key byte-order)

Given a GIF data stream, returns a rendered image.

The BYTE-ORDER keyword argument is one of :ARGB or :BGRA. It states the order of bytes in the resulting vectors.

Three values are returned.
The first value is a list of vectors containing resulting ARGB data in row-first order and each second element
The second value is a list of integer values for the frame delays in milliseconds.
The third value is a list of three values: image width, image height and a generalized boolean signifying if the GIF should loop.

Package

skippy-renderer.

Source

skippy-renderer.lisp.


5.2 Internals


Previous: , Up: Internals   [Contents][Index]

5.2.1 Ordinary functions

Function: index-argb (color-table index transparency-index)
Package

skippy-renderer.

Source

skippy-renderer.lisp.

Function: index-bgra (color-table index transparency-index)
Package

skippy-renderer.

Source

skippy-renderer.lisp.

Function: render-image-to-frame (frame frame-width image color-table &key byte-order)
Package

skippy-renderer.

Source

skippy-renderer.lisp.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables