{"id":13743117,"url":"https://github.com/LeeBurrows/Async-Image-Encoders","last_synced_at":"2025-05-09T00:32:47.675Z","repository":{"id":6613527,"uuid":"7856977","full_name":"LeeBurrows/Async-Image-Encoders","owner":"LeeBurrows","description":"Asynchronously encode BitmapData objects into image file format","archived":false,"fork":false,"pushed_at":"2013-08-28T01:33:06.000Z","size":285,"stargazers_count":20,"open_issues_count":1,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-03T05:02:04.589Z","etag":null,"topics":["actionscript","encoding-library","image"],"latest_commit_sha":null,"homepage":null,"language":"ActionScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LeeBurrows.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-27T19:39:20.000Z","updated_at":"2022-11-10T18:52:37.000Z","dependencies_parsed_at":"2022-07-31T02:48:07.924Z","dependency_job_id":null,"html_url":"https://github.com/LeeBurrows/Async-Image-Encoders","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/LeeBurrows%2FAsync-Image-Encoders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeeBurrows%2FAsync-Image-Encoders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeeBurrows%2FAsync-Image-Encoders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeeBurrows%2FAsync-Image-Encoders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeeBurrows","download_url":"https://codeload.github.com/LeeBurrows/Async-Image-Encoders/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224796238,"owners_count":17371459,"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":["actionscript","encoding-library","image"],"created_at":"2024-08-03T05:00:40.924Z","updated_at":"2024-11-15T14:30:54.554Z","avatar_url":"https://github.com/LeeBurrows.png","language":"ActionScript","readme":"#Asynchronous Image Encoders\n\n##ActionScript 3 classes for asynchronously encoding BitmapData source into image file formats\n\nEncodes BitmapData objects over multiple frames to avoid freezing the UI. Ideally suited for mobile AIR where ActionScript Workers are unavailable.\n\nSpecify milliseconds per frame to allocate to encoding. Stop processing at any time.\n\nCurrent supported file formats:\n\n* .JPG\n* .PNG\n* .BMP\n\nOthers can be added by sub-classing AsyncImageEncoderBase to implement asynchronous processing.\nSee ASDocs for further details on implementing your own encoders.\n\n\nA simple usage example:\n\n\tpackage\n\t{\n\t\timport com.leeburrows.encoders.AsyncPNGEncoder;\n\t\timport com.leeburrows.encoders.supportClasses.AsyncImageEncoderEvent;\n\t\timport com.leeburrows.encoders.supportClasses.IAsyncImageEncoder;\n\t\timport flash.display.BitmapData;\n\t\timport flash.display.Sprite;\n\t\n\t\tpublic class PNGEncoderExample extends Sprite\n\t\t{\n\t\t\tprivate var encoder:IAsyncImageEncoder;\n\t\n\t\t\tpublic function PNGEncoderExample()\n\t\t\t{\n\t\t\t\t//generate a BitmapData object to encode\n\t\t\t\tvar myBitmapData:BitmapData = new BitmapData(1000, 1000, true, 0x80FF9900);\n\t\t\t\t//create a new PNG encoder\n\t\t\t\tencoder = new AsyncPNGEncoder();\n\t\t\t\t//add progress and complete listeners\n\t\t\t\tencoder.addEventListener(AsyncImageEncoderEvent.PROGRESS, encodeProgressHandler);\n\t\t\t\tencoder.addEventListener(AsyncImageEncoderEvent.COMPLETE, encodeCompleteHandler);\n\t\t\t\t//start encoding for 20 milliseconds per frame\n\t\t\t\tencoder.start(myBitmapData, 20);\n\t\t\t}\n\t\n\t\t\tprivate function encodeProgressHandler(event:AsyncImageEncoderEvent):void\n\t\t\t{\n\t\t\t\t//trace progress\n\t\t\t\ttrace(\"encoding progress:\", Math.floor(event.percentComplete)+\"% complete\");\n\t\t\t}\n\t\n\t\t\tprivate function encodeCompleteHandler(event:AsyncImageEncoderEvent):void\n\t\t\t{\n\t\t\t\tencoder.removeEventListener(AsyncImageEncoderEvent.PROGRESS, encodeProgressHandler);\n\t\t\t\tencoder.removeEventListener(AsyncImageEncoderEvent.COMPLETE, encodeCompleteHandler);\n\t\t\t\t//trace size of result\n\t\t\t\ttrace(\"encoding completed:\", encoder.encodedBytes.length+\" bytes\");\n\t\t\t\t//do something with the bytes...\n\t\t\t\t//..save to filesystem?\n\t\t\t\t//..upload to server?\n\t\t\t\t//..set as source for flex Image component?\n\t\t\t}\n\t\t}\n\t}\n\t\n###Version History###\n\n* v1.0.1\n    + Initial build.\n\n* v1.0.2\n    + Fixed issue #001 : Validate start() BitmapData Argument.\n    + Fixed issue #002 : Consolidate Events.\n    + Fixed issue #003 : Private _encodedBytes Property Exposed Via Reference.\n\n* v1.0.3\n    + ASDocs inserted into SWC to facilitate IDE code hinting.\n\n* v1.0.4\n    + Added dispose() method.\n    + Fixed issue #004 : Unnecessary memory retention.\n","funding_links":[],"categories":["Multimedia"],"sub_categories":["Image"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLeeBurrows%2FAsync-Image-Encoders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLeeBurrows%2FAsync-Image-Encoders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLeeBurrows%2FAsync-Image-Encoders/lists"}