Fork me on GitHub

随笔分类 -  CGImage

convertUIImageToBitmapRGBA8
摘要:/* * The MIT License * * Copyright (c) 2011 Paul Solt, PaulSolt@gmail.com * * https://github.com/PaulSolt/UIImage-Conversion/blob/master/MITLicense.txt * */#import <Foundation/Foundation.h>@interface ImageHelper : NSObject { }/** Converts a UIImage to RGBA8 bitmap. @param image - a UIImage to 阅读全文

posted @ 2012-05-07 17:04 pengyingh 阅读(1315) 评论(0) 推荐(0)

What Color is My Pixel? Image based color picker on iPhone
摘要:My Postcards app has a design screen where you can change colors of things, so I needed a color picker. A very easy way to make a color picker on just about any platform is to make some kind of color pallet image file, display it for the user to click on, and do a call like: getPixelColorAtScreenLoc 阅读全文

posted @ 2012-05-07 16:24 pengyingh 阅读(522) 评论(0) 推荐(0)

How to get the RGB values for a pixel on an image on the iphone
摘要:http://stackoverflow.com/questions/144250/how-to-get-the-rgb-values-for-a-pixel-on-an-image-on-the-iphoneMethod 1: Writable Pixel InformationI defined constants#define RGBA 4#define RGBA_8_BIT 8In my UIImage subclass I declared instance variables:size_t bytesPerRow;size_t byteCount;size_t pi... 阅读全文

posted @ 2012-05-07 16:22 pengyingh 阅读(2331) 评论(0) 推荐(0)

导航