{"id":16426798,"url":"https://github.com/wasabeef/gifflen-sample","last_synced_at":"2025-03-23T07:32:57.738Z","repository":{"id":9629512,"uuid":"11559042","full_name":"wasabeef/gifflen-sample","owner":"wasabeef","description":"Bitmap color reduction and GIF encoding","archived":false,"fork":false,"pushed_at":"2015-07-28T04:03:23.000Z","size":1771,"stargazers_count":31,"open_issues_count":3,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-11T08:10:42.625Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wasabeef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-21T08:23:46.000Z","updated_at":"2020-11-11T08:16:41.000Z","dependencies_parsed_at":"2022-09-11T16:42:15.926Z","dependency_job_id":null,"html_url":"https://github.com/wasabeef/gifflen-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2Fgifflen-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2Fgifflen-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2Fgifflen-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2Fgifflen-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasabeef","download_url":"https://codeload.github.com/wasabeef/gifflen-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221847071,"owners_count":16890959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T08:10:26.709Z","updated_at":"2024-10-28T15:13:02.300Z","avatar_url":"https://github.com/wasabeef.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"gifflen-sample\n==============\n\nAndroidでGif Animation Fileを生成するサンプル\n\nBitmap color reduction and GIF encoding\n\n@see http://jiggawatt.org/badc0de/android/#gifflen\n\nI've written a small native lib for Android to do color quantization (from 2-256 colors) of a Bitmap and save the result as a frame in an animated GIF (you can add as many frames as you like).\nYou may hack and slash the library code as you wish to fit your needs. The color quantizer used is Anthony Dekker's NeuQuant, with some modifications made by me.\n\n\nThe Java code to use the library would be something like:\n\n    static {\n      System.loadLibrary(\"gifflen\");\n    }\n\n    ....\n\n    public native int Init(String gifName, int w, int h, int numColors, int quality,\n                           int frameDelay);\n    public native void Close();\n    public native int AddFrame(int[] inArray);\n\n    ....\n\n\n    // Filename, width, height, colors, quality, frame delay\n    if (Init(\"/sdcard/foo.gif\", width, height, 256, 100, 4) != 0) {\n    \tLog.e(\"gifflen\", \"Init failed\");\n    }\n\n    int[] pixels = new int[width*height];\n    // bitmap should be 32-bit ARGB, e.g. like the ones you get when decoding\n    // a JPEG using BitmapFactory\n    bitmap.getPixels(pixels, 0, width, 0, 0, width, height);\n\n    // Convert to 256 colors and add to foo.gif\n    AddFrame(pixels);\n\n    Close();\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasabeef%2Fgifflen-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasabeef%2Fgifflen-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasabeef%2Fgifflen-sample/lists"}