Code Monkey home page Code Monkey logo

iffshow's Introduction

IFFshow, an IFF-ILBM image viewer in Python

(Requires PyGame)

iffshow.py filename

Loads the picture given as a commandline argument and displays it in a PyGame window.

Keyboard controls:

  • Space to toggle showing the image palette
  • S to save image as PNG
  • Escape (or closing the window) to quit

Images are always resized to the size of the IFFshow window (1280x960px by default).

The common Amiga graphics modes including EHB, HAM6, HAM8, and 24-/32-bit deep color should all work. There is also support for 8-bit IFF-PBM images.

Note that SDL_image (and therefore PyGame) can actually load IFF images directly, so decoding IFF in Python like in iffshow.py is not really necessary. I only learned this after writing iffshow.py though...

IFF-ILBM creation scripts

(Both require PyGame)

24-bit

iff24.py filename

Converts an input image to an uncompressed 24-bit IFF-ILBM file.

The input should be a JPG or PNG file and preferably in an aspect ratio close to 4:3.

By default the output image is in low-res PAL resolution (320x256px).

DeluxePaint V on the Amiga can read these 24-bit IFF images and convert them e.g. to HAM8 or 256 colors if you disable the DPaint backing store.

HAM

ham.py filename

Similar to iff24.py, but it converts an input image to an uncompressed 6-bit HAM mode IFF-ILBM file. No palette is used, therefore image quality is not the greatest.

ham8.py filename

Same as ham.py, but for 8-bit HAM mode. Parts of the image with subtle color gradients like the sky will look a bit better in HAM8 than in HAM6.

License

Public Domain / CC0

Screenshot

screenshot

iffshow's People

Contributors

mdoege avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

retronick2020

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.