-
Notifications
You must be signed in to change notification settings - Fork 57
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
Generalize the signature of CairoImageSurface constructor #252
Comments
Could you provide more info on the "in the default case that the image needs to be transposed"? And where this is/should be done? This might be a case, where you keep the data as it is and use coordinate transformation to get the transpose (rotation). |
Line 263 of Cairo.jl:
Unless you opt out of |
Not sure about the best way to implement it. Maybe an additional method
would be a solution. Probably want to avoid the glaring type instabilities (of |
Best would probably be a method specifically for julia> x = RGB24(0.2, 0.8, 0.5)
RGB24(0.2N0f8,0.8N0f8,0.502N0f8)
julia> reinterpret(UInt32, x)
0x0033cc80 |
I just wanted add that the corollary of Also, should the methods for In case it's helpful, the context that led me here was drawing onto a |
In GtkReactive there's a call to Cairo that for Julia 0.6 was
With the lazy
reinterpret
in Julia 0.7 this can no longer be used directly and it's necessary to force it to materialize the reinterpret before sending it over:However, in the default case that the image needs to be transposed, this unnecessarily makes two copies of the data instead of one, since
permutedims
could work directly on theReinterpretArray
if the constructor accepted it.Cc: @timholy
The text was updated successfully, but these errors were encountered: