守望者--AIR技术交流

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
热搜: ANE FlasCC 炼金术
查看: 1342|回复: 0
打印 上一主题 下一主题

CameraRoll 本机扩展

[复制链接]
  • TA的每日心情
    擦汗
    2018-4-10 15:18
  • 签到天数: 447 天

    [LV.9]以坛为家II

    1742

    主题

    2094

    帖子

    13万

    积分

    超级版主

    Rank: 18Rank: 18Rank: 18Rank: 18Rank: 18

    威望
    562
    贡献
    29
    金币
    52903
    钢镚
    1422

    开源英雄守望者

    跳转到指定楼层
    楼主
    发表于 2015-1-29 15:55:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    应用下载
    应用名称: ANE-CameraRoll
    支持64位:
    当前版本: 未知
    运行平台: Android IOS 其他 
    开发语言: ActionScript 3 JAVA 其他 
    应用类别: ANE-多平台
    应用简介: Code
    Issues 2
    Pull Requests 0
    Wiki
    Pulse
    Graphs
    HTTPS clone URL

    You can clone with HTTPS, SSH, or Subversion.

    Clone in Desktop Download ZIP
    This Adobe Air Native Extension (ANE) gives better support for accessing the CameraRoll of a mobile device as the current AIR API classes (CameraUI, CameraRoll) do. At the moment this ANE is only available for iOS, but it is planned to release it also for the Android platform.
    本帖最后由 破晓 于 2015-3-1 10:33 编辑

    Adobe Air Native Extension (ANE) for better support of mobile device’s CameraRoll

    This native extension is still in work, so please be careful when including in your project!
    At the moment it is available only for iOS, but it is planned to extend this project to work for Android devices as well.

    The example shows how to use the extension and uses these aspects:

    • Getting the default thumbnail dimensions
    • Loading a set of thumbnails by index and offset
    • Loading a set of thumbnails by their URLs
    • Loading a fullscreen image by the URL of the thumbnail metadata when clicking on a thumbnail

    The following functions are available:

    getInstance():CameraRollExtension

    Returns: A Singleton instance of CameraRollExtension

    isSupported():Boolean

    Returns: A Boolean saying if this ANE can be used (true for iOS and Android devices)

    initNativeCode():void

    Called internally after the extension context has been created

    determineThumbnailDefaultDimensions():void

    If at least one image exists in CameraRoll the thumbnail dimensions are determined. Since this is an async
    call you have to register these two listeners:

    PhotoAppEvent.EVENT_DEFAULT_THUMBNAIL_DIMENSIONS_LOADED → event.data contains a PhotoDimensions object
    PhotoAppEvent.EVENT_DEFAULT_THUMBNAIL_DIMENSIONS_NOT_LOADED → normally no image has been found in CameraRoll

    getCurrentPhotoDimensions(type:String = PHOTO_TYPE_THUMBNAIL):PhotoDimensions

    Gets the dimensions for the just loaded single photo asset of type thumbnail.

    countPhotos():void

    Async call for getting the number of images in CameraRoll. Register this listener for getting notified:

    PhotoAppEvent.EVENT_COUNT_PHOTOS → event.data contains the count as a String

    loadThumbnailPhotoAssets(startIndex:int, amount:int, type:String = LOAD_PHOTO_TYPE_THUMBNAILS):void

    Async loads a number of photo assets (incl. some metadata) with offset startIndex of either type thumbnail (LOAD_PHOTO_TYPE_THUMBNAILS) or aspectRatioThumbnail (LOAD_PHOTO_TYPE_ASPECT_RATIO_THUMBNAILS).

    Register this listener for being notified about loading the list of images: PhotoAppEvent.EVENT_THUMBS_LOADED → event.data contains an Array of PhotoObject objects,
    where ‘photo’ contains the loaded BitmapData and metadata a PhotoMetadata object.

    loadThumbnailPhotoAssetsForUrls(urls:Array, type:String = LOAD_PHOTO_TYPE_THUMBNAILS_FOR_URLS):void

    Async loads a number of photo assets for the passed list of url’s of either type thumbnail (LOAD_PHOTO_TYPE_THUMBNAILS) or aspectRatioThumbnail (LOAD_PHOTO_TYPE_ASPECT_RATIO_THUMBNAILS).

    Register this listener for being notified about loading the list of images: PhotoAppEvent.EVENT_THUMBS_FOR_URLS_LOADED → event.data contains an Array of PhotoObject objects,
    where ‘photo’ contains the loaded BitmapData and metadata a PhotoMetadata object.

    loadThumbnailPhotoForUrl(url:String, type:String = LOAD_PHOTO_TYPE_THUMBNAIL):void

    Async loads one photo asset (incl. some metadata) for the given url and the type thumbnail.

    Register these two listeners to be notified:

    PhotoAppEvent.EVENT_THUMBNAIL_IMAGE_LOADED → event.data contains the loaded image in a PhotoObject object
    PhotoAppEvent.EVENT_THUMBNAIL_IMAGE_NOT_LOADED

    loadFullScreenPhotoForUrl(url:String, type:String = LOAD_PHOTO_TYPE_FULL_SCREEN):void

    Async loads one photo asset for the given url and the type fullscreen.

    Register these two listeners to be notified:

    PhotoAppEvent.EVENT_FULL_SCREEN_IMAGE_LOADED → event.data contains the loaded image in a PhotoObject object
    PhotoAppEvent.EVENT_FULL_SCREEN_IMAGE_NOT_LOADED

    loadFullResolutionPhotoForUrl(url:String, type:String = LOAD_PHOTO_TYPE_FULL_RESOLUTION):void

    Async loads one photo asset for the given url and the type fullresolution.

    Register these two listeners to be notified:

    PhotoAppEvent.EVENT_FULL_RESOLUTION_IMAGE_LOADED → event.data contains the loaded image in a PhotoObject object
    PhotoAppEvent.EVENT_FULL_RESOLUTION_IMAGE_NOT_LOADED

    loadThumbnailPhotoAtIndex(index:int, type:String = LOAD_PHOTO_TYPE_THUMBNAIL):void

    Async loads one photo asset from CameraRoll for the given CameraRoll index and the type thumbnail.

    Register these two listeners to be notified:

    PhotoAppEvent.EVENT_THUMBNAIL_IMAGE_LOADED → event.data contains the loaded image in a PhotoObject object
    PhotoAppEvent.EVENT_THUMBNAIL_IMAGE_NOT_LOADED

    loadFullScreenPhotoAtIndex(index:int, type:String = LOAD_PHOTO_TYPE_FULL_SCREEN):void

    Async loads one photo asset from CameraRoll for the given CameraRoll index and the type fullscreen.

    Register these two listeners to be notified:

    PhotoAppEvent.EVENT_FULL_SCREEN_IMAGE_LOADED → event.data contains the loaded image in a PhotoObject object
    PhotoAppEvent.EVENT_FULL_SCREEN_IMAGE_NOT_LOADED

    loadFullResolutionPhotoAtIndex(index:int, type:String = LOAD_PHOTO_TYPE_FULL_RESOLUTION):void

    Async loads one photo asset from CameraRoll for the given CameraRoll index and the type fullresolution.

    Register these two listeners to be notified:

    PhotoAppEvent.EVENT_FULL_RESOLUTION_IMAGE_LOADED → event.data contains the loaded image in a PhotoObject object
    PhotoAppEvent.EVENT_FULL_RESOLUTION_IMAGE_NOT_LOADED

    getPhotoInfos(startIndex:int, length:int):Array

    Sync loads metadata for the just loaded photo assets.
    Be careful: This call doesn’t load photo assets, therefore you have to load them before that call!

    getCurrentPhotoInfo():PhotoMetadata

    Sync loads metadata for the just loaded photo asset.
    Be careful: This call doesn’t load photo assets, therefore you have to load it before that call!

    Please note

    This ANE has been written in combination with a iPhone app to get better support for that device’s images in CameraRoll.
    The app offers a paging mechanism when the user wants to see more images than fit on one device screen.
    It is NOT RECOMMENDED to use this ANE when you want to load all existing images in CameraRoll in one step. The app could
    crash in such a circumstance due to memory issues.

    The iOS project has been built against iOS 4.3 Deployment Target.
    If you encounter problems or see improvements for stability and/or performance please fork this project or let me know by leaving a message.

    Donate

    If you think this ANE is useful i would be grateful for a donation.

    License

    THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    Copyright © 2013 by Valentin Treu, released under the MIT license.





    相关链接:


    https://github.com/rivella50/ANE-CameraRoll


    相关下载:


    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
    收藏收藏 分享分享 支持支持 反对反对 微信
    守望者AIR技术交流社区(www.airmyth.com)
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    
    关闭

    站长推荐上一条 /4 下一条

    QQ|手机版|Archiver|网站地图|小黑屋|守望者 ( 京ICP备14061876号

    GMT+8, 2026-1-23 23:23 , Processed in 0.050915 second(s), 33 queries .

    守望者AIR

    守望者AIR技术交流社区

    本站成立于 2014年12月31日

    快速回复 返回顶部 返回列表