cgimageref

    2热度

    1回答

    这里有究竟是如何在上下文得出一个UIImage: UIGraphicsBeginImageContextWithOptions(size, NO, 0.0f); [someUIImage drawInRect:CGRectMake(...)]; [someOtherUIImage drawInRect:CGRectMake(...)]; [someOtherUIImage drawInRec

    1热度

    1回答

    一旦我不能从相机(https://stackoverflow.com/questions/19673770/objective-c-avcapturevideodataoutput-videosettings-how-to-identify-which-pix) 所以,我的目标是跟OpenCV的过程后,显示此CMSampleBufferRef(420的YCbCr),作为彩色框成功地得到任何的YCb

    2热度

    2回答

    我创造模糊图像我的应用程序的屏幕之一,为此我使用下面的代码 UIGraphicsBeginImageContext(self.view.bounds.size); [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image = UIGraphicsGetImageFromCurrentImage

    0热度

    1回答

    我试过使用本文中描述的类别解决方案(How to get the RGB values for a pixel on an image on the iphone)。它似乎不适用于我的情况。 我的方案,我画圈圈响应敲击手势: //mainImageView is an IBOutlet of class UIImageView. So here we simply get a pointer to

    0热度

    2回答

    我正在使用以下代码来应用图像过滤器。在我的应用程序中,我正在过滤亮度,对比度和饱和度。我使用三个单独的滑块来更改值。随着我继续移动这些值,内存消耗超过1.5 GB并崩溃。有没有一种方法可以减少无崩溃实现的内存消耗? (void)setBrightnessAndContrastOf:(UIImage *)image { // forTarget:(UIImageView *)imgView {

    1热度

    2回答

    我有CGImageRef对象(var quartzImage)。如何转换这个对象格式PNG数据网络: “数据:图像/ PNG; BASE64,” +的base64数据图像 我的代码: - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer

    0热度

    1回答

    我用这个方法来生成视频 -(NSMutableArray *)generateThumbnailsFromUrl:(NSURL *)videoURl{ AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:videoURl options:nil]; Float64 durationFrames = CMTimeGetSeconds([as

    1热度

    1回答

    我在CMYK颜色空间中有CGImage(即CGColorSpaceGetModel在通过CGImageGetColorSpace查询时返回kCGColorSpaceModelCMYK)。 但是,当我尝试通过CGImageDestination进行保存时,它将转换为RGBColorSpace。我试图设置正确的派系价值,但无济于事。我怎么知道这个?当我用预览打开保存的图像时,通用信息选项卡会告诉我'C

    0热度

    1回答

    我在这几个小时里一直在挠头。 我正在使用以下方法调整2个图像的大小。一个接一个: CGImageRef imageReference = [image CGImage]; bytes = malloc(width * height * 4); NSUInteger bytesPerPixel = 4; NSUInteger bytesPerRow = bytesPerPixel * wid

    1热度

    1回答

    我有一些 CGImageRef cgImage = "something" 有没有办法来处理这个cgImage的像素值?例如,如果此图像包含0.0001和3000之间的值,因此当我尝试在NSImageView(How can I show an image in a NSView using an CGImageRef image) 中以这种方式查看或释放图像时,我得到一个黑色图像,所有像素都