Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gif timeserie #102

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Gif timeserie #102

wants to merge 8 commits into from

Conversation

jlarouche
Copy link

Pull request related to http://www.mapserver.org/development/rfc/ms-rfc-111.html

This pull request adds a new format to MapCache, Gif. It also has a new write_frames function to encode an animated image.

It includes new attributes for the time dimension, animate and delay.

The check to see if we need to animate is in mapcache_core_get_map. It checks the assembly_type of the Tileset.

juliensam and others added 5 commits May 14, 2014 10:37
Moved animation test from service_wms to core.
Added configuration for delay and animation in timedimension.
lib/core.c Outdated
basemap = mapcache_assemble_maps(ctx, req_map->maps, req_map->nmaps, req_map->resample_mode);
if(req_map->maps[0]->tileset->timedimension &&
req_map->maps[0]->tileset->timedimension->assembly_type == MAPCACHE_TIMEDIMENSION_ASSEMBLY_ANIMATE)
basemap = mapcache_assemble_animated_maps(ctx, req_map->maps, req_map->nmaps, req_map->resample_mode);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't pollute the core_get_map function with this switch, instead branch off to the specific assembly method inside mapcache_assemble_maps()

@jlarouche
Copy link
Author

I've modified the assemble_map function to work with animated and non-animated request. It loops on the number of frames needed. So in the case of a non-animated map, it loops only once.

I am also wondering, to remove write_frame and use only write, I would still need to make a check if the tileset is animated since I have to pass the delay to the GIF encoding function, would that work? Since the delay is confirgured in the tileset and it isn't available in the encoding function I have to pass it before. That's why we were wondering if having an animted GIF format, separate from a standard non-animated gif, where we would set the delay in the format setting would be better?

When you say I could put the quantize functions in another file, would making a file like quantize.c and putting the quantizes functions in there and then including it where needed works?

Thanks for the comments

@juliensam
Copy link

Note: We will simply modify other image writers to support more then one image. If more than one images are passed png and jpeg will fail and gif will animate them,

Base automatically changed from master to main January 15, 2021 22:57
jbo-ads added a commit to jbo-ads/mapcache that referenced this pull request Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants