I've implemented a screenshot function of NSView, UIView and GLKView.#230
I've implemented a screenshot function of NSView, UIView and GLKView.#230suzumura-ss wants to merge 10 commits intomoredip:masterfrom
Conversation
|
@MichaelBuckley can I get your opinion on this pull request since it's in your OS X world? |
|
@moredip This is not really OS X related - GLKView is an iOS class. I am pretty sure the code is working although some of the (I don't understand the need for sending base-64-encoded images back to ruby). |
|
@moredip I left a comment, but it otherwise looks good. |
|
Oh yeah, I agree with @ondrejhanslik. The category methods should be prefixed. |
|
Yes, I'm a bit confused as to what the need is for the base64-encoded image. @suzumura-ss, can you explain? I think it'd make more sense to separate out the GLKView support from the base64 stuff. |
|
The reason I was Base64-encoded, I did not know how to generate a JSON object with PNG-binary in If GLKView support is extensible to And, I agree that to put a prefix. |
|
Also, instead of checking the availability of method I still don't like the Base-64 encoding. Maybe we could use the implementation that is already present in the "screenshot/snapshot-all-views" => will capture all the views def get_view_screenshot(view_selector)
frank_server.send_get("screenshot/snapshot-all-views")
view_uids = frankly_map(view_selector, "FEX_UID")
screenshots = Array.new
view_uids.each do |uid|
path = "screenshot/view-snapshot/#{uid}"
image_data = frank_server.send_get( path )
screenshots.push(image_data)
end
screenshots
endThis supposes adding a method What do you think? |
|
Why did not the category of GLKView call I also thought the idea to get UID. |
|
IIRC the snapshotAllViews method manages its own garbage - it clears out any old snapshots before it saves the new ones. Cheers, PeteTyped on a little bitty keyboard On Jul 3, 2013, at 5:00 AM, Toshiyuki Suzumura notifications@github.com wrote:
|
|
I made sure the matter of garbage. It was cleared. I tried to implement |
Hi there.
I've implemented a screenshot function of NSView, UIView and GLKView.
NSOpenGLView does not support.
UIView#-(UIImage*)captureImage, make the image using theGLKView#-(UIImage*)snapshotmethod in the case of GLKView.-(NSString*)captureBase64PngImagemethod to NSView and UIView. To FrankHelper, this sends a PNG image with the Base64 encoding.FrankHelper#capture(selector)returns to the test code with Base64 decode this data.