{"action":"created","issue":{"url":"https://api.github.com/repos/FLIF-hub/FLIF/issues/296","repository_url":"https://api.github.com/repos/FLIF-hub/FLIF","labels_url":"https://api.github.com/repos/FLIF-hub/FLIF/issues/296/labels{/name}","comments_url":"https://api.github.com/repos/FLIF-hub/FLIF/issues/296/comments","events_url":"https://api.github.com/repos/FLIF-hub/FLIF/issues/296/events","html_url":"https://github.com/FLIF-hub/FLIF/issues/296","id":175115044,"number":296,"title":"Enhancing the API for performance","user":{"login":"fherzog2","id":14953373,"avatar_url":"https://avatars.githubusercontent.com/u/14953373?v=3","gravatar_id":"","url":"https://api.github.com/users/fherzog2","html_url":"https://github.com/fherzog2","followers_url":"https://api.github.com/users/fherzog2/followers","following_url":"https://api.github.com/users/fherzog2/following{/other_user}","gists_url":"https://api.github.com/users/fherzog2/gists{/gist_id}","starred_url":"https://api.github.com/users/fherzog2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fherzog2/subscriptions","organizations_url":"https://api.github.com/users/fherzog2/orgs","repos_url":"https://api.github.com/users/fherzog2/repos","events_url":"https://api.github.com/users/fherzog2/events{/privacy}","received_events_url":"https://api.github.com/users/fherzog2/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FLIF-hub/FLIF/labels/feature%20request","name":"feature request","color":"5319e7"},{"url":"https://api.github.com/repos/FLIF-hub/FLIF/labels/library","name":"library","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-05T18:34:12Z","updated_at":"2016-09-06T08:50:12Z","closed_at":null,"body":"While working on the windows plugin, I found some cases where the API is still lacking.\r\n\r\nFirst, there could be a function for getting some basic info from a FLIF file without having to decode any images. This could also be used as a quick check if a file is indeed FLIF.\r\n\r\n```\r\nFLIF_DLLIMPORT FLIF_INFO* FLIF_API flif_read_info_from_memory(const void* buffer, size_t buffer_size_bytes);\r\n\r\nFLIF_DLLIMPORT void FLIF_API flif_destroy_info(FLIF_INFO* info);\r\n\r\nFLIF_DLLIMPORT uint32_t FLIF_API flif_info_get_width(FLIF_INFO* info);\r\n\r\nFLIF_DLLIMPORT uint32_t FLIF_API flif_info_get_height(FLIF_INFO* info);\r\n\r\nFLIF_DLLIMPORT uint8_t  FLIF_API flif_info_get_nb_channels(FLIF_INFO* info);\r\n\r\nFLIF_DLLIMPORT uint8_t  FLIF_API flif_info_get_depth(FLIF_INFO* info);\r\n```\r\n\r\nSecond, for animated FLIF, there could be a parameter to decode just the first image as a preview and skip the rest. Without it, creating a thumbnail from animated FLIF is kinda slow.\r\n\r\n```\r\nFLIF_DLLIMPORT void FLIF_API flif_decoder_decode_until_image(FLIF_DECODER* decoder, size_t index);\r\n```\r\n\r\nAny thoughts about this?"},"comment":{"url":"https://api.github.com/repos/FLIF-hub/FLIF/issues/comments/244888907","html_url":"https://github.com/FLIF-hub/FLIF/issues/296#issuecomment-244888907","issue_url":"https://api.github.com/repos/FLIF-hub/FLIF/issues/296","id":244888907,"user":{"login":"jonsneyers","id":15010068,"avatar_url":"https://avatars.githubusercontent.com/u/15010068?v=3","gravatar_id":"","url":"https://api.github.com/users/jonsneyers","html_url":"https://github.com/jonsneyers","followers_url":"https://api.github.com/users/jonsneyers/followers","following_url":"https://api.github.com/users/jonsneyers/following{/other_user}","gists_url":"https://api.github.com/users/jonsneyers/gists{/gist_id}","starred_url":"https://api.github.com/users/jonsneyers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonsneyers/subscriptions","organizations_url":"https://api.github.com/users/jonsneyers/orgs","repos_url":"https://api.github.com/users/jonsneyers/repos","events_url":"https://api.github.com/users/jonsneyers/events{/privacy}","received_events_url":"https://api.github.com/users/jonsneyers/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T08:50:12Z","updated_at":"2016-09-06T08:50:12Z","body":"I think in this case, a non-opaque struct is probably OK since you'll typically want all or most of the information anyway (you don't want the width but not the height, or the bit depth but not the number of channels).\r\n\r\nAs for animations: it's impossible to decode just the first frame without decoding the rest of it, because animations are stored with all frames mixed together. This makes it possible to progressively load a full animation at a lower resolution (so you could use a lower res animation as a preview), but it makes it impossible to load just the first frame without also loading all the other frames."}}
{"actor":{"display_login":"jonsneyers"}}