Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Visualize command with CGImageRef #100

Closed
mohamede1945 opened this issue Jun 14, 2015 · 3 comments
Closed

Issue with Visualize command with CGImageRef #100

mohamede1945 opened this issue Jun 14, 2015 · 3 comments

Comments

@mohamede1945
Copy link

Whenever I try the visualize a CGImageRef. I got the following error:

error: error: cannot initialize a parameter of type 'CGImage *' with an lvalue of type 'CGImageRef' (aka 'CGImage *')
error: 1 errors parsing expression
Traceback (most recent call last):
  File "/usr/local/opt/chisel/libexec/fblldb.py", line 81, in runCommand
    command.run(args, options)
  File "/usr/local/Cellar/chisel/1.2.0/libexec/commands/FBVisualizationCommands.py", line 138, in run
    _visualize(arguments[0])
  File "/usr/local/Cellar/chisel/1.2.0/libexec/commands/FBVisualizationCommands.py", line 109, in _visualize
    _showImage('(id)[UIImage imageWithCGImage:' + target + ']')
  File "/usr/local/Cellar/chisel/1.2.0/libexec/commands/FBVisualizationCommands.py", line 37, in _showImage
    imageBytesStartAddress = fb.evaluateExpression('(void *)[(id)' + imageDataAddress + ' bytes]')
TypeError: cannot concatenate 'str' and 'NoneType' objects

Using Xcode 6.3.2

@kastiglione
Copy link
Contributor

Do you know what image format the underlying CGImageRef uses?

The visualize command is making use of UIImagePNGRepresentation, which the documentation states:

A data object containing the PNG data, or nil if there was a problem generating the data. This function may return nil if the image has no data or if the underlying CGImageRef contains data in an unsupported bitmap format.

@mohamede1945
Copy link
Author

You are correct. My data is in JPG format. I'll close it as invalid.

@kastiglione
Copy link
Contributor

I should look into what it would take to support other formats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants