Giter VIP home page Giter VIP logo

fltk-gif-animation's People

Contributors

wcout avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fltk-gif-animation's Issues

Non-animated GIF handling less than ideal

Still finding this code to be extremely useful.

I've used the patch which changes fl_images_core.cxx, in fl_check_images, so that GIF files are loaded as Fl_Anim_GIF_Image instances.

But this leads to the following convolution when it comes time to draw, in order to handle non-animated GIFs:

		if (animgif_->is_animated())
		{
			animgif_->draw(xoff, yoff, xsize, ysize);
		}
		else
		{
			animgif_->Fl_Pixmap::draw(xoff, yoff, xsize, ysize);
		}

It "works" but requires "knowing" that Fl_Anim_GIF_Image is derived from Fl_Pixmap!

I'd prefer that animgif_->draw() would work for both animated and still GIFs. I'm not smart enough yet to quite understand the implications of this comment in the Fl_Anim_GIF_Image code:

    // Note: should the base class be called here?
    //       If it is, then the copy() method must also
    //       copy the base image!
//    Inherited::draw(x_, y_, w_, h_, cx_, cy_);

Advice, fixes appreciated.

Won't read any GIF under Windows

Just getting started but so far this project is looking fantastic!!

A blocker for Windows users: in Fl_Anim_GIF_Image.cxx, in the function readin, the following line (at or about line 548):

  FILE *gif = fopen(name_, "r");

needs to be changed to:

  FILE *gif = fopen(name_, "rb");

Without the binary flag, Windows will stop reading at the first zero byte.

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.