Bug 56159 - provide API for creating WKImage from CGImageRef
Summary: provide API for creating WKImage from CGImageRef
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Alice Liu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 17:51 PST by Alice Liu
Modified: 2011-03-14 17:49 PDT (History)
1 user (show)

See Also:


Attachments
patch (2.30 KB, patch)
2011-03-10 19:37 PST, Alice Liu
no flags Details | Formatted Diff | Diff
patch without WKSize (2.33 KB, patch)
2011-03-11 02:51 PST, Alice Liu
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alice Liu 2011-03-10 17:51:53 PST
a WKImage can provide its image data as a CGImageRef (via WKImageCreateCGImage), but we don't have the ability to go the other way around, to create a WKImage from CGImage data.
Comment 1 Alice Liu 2011-03-10 19:37:44 PST
Created attachment 85426 [details]
patch
Comment 2 Sam Weinig 2011-03-10 21:37:09 PST
Comment on attachment 85426 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=85426&action=review

> Source/WebKit2/Shared/API/c/cg/WKImageCG.h:31
> +#include <WebKit2/WKImage.h>

This include should not be necessary.  If it is, please sort these.

> Source/WebKit2/Shared/API/c/cg/WKImageCG.h:40
> +WK_EXPORT WKImageRef WKImageCreateFromCGImage(CGImageRef imageRef, WKSize size, WKImageOptions options);

Why not just get the size from the CGImageRef?
Comment 3 Alice Liu 2011-03-11 02:51:17 PST
Created attachment 85453 [details]
patch without WKSize

the inclusion of WKImage.h is needed for WKImageOptions.
Comment 4 Alice Liu 2011-03-14 17:49:32 PDT
committed http://trac.webkit.org/projects/webkit/changeset/81087