RESOLVED INVALID Bug 79651
[GTK] Crop support in BitmapImage
https://bugs.webkit.org/show_bug.cgi?id=79651
Summary [GTK] Crop support in BitmapImage
Philippe Normand
Reported 2012-02-27 02:10:45 PST
I'm not sure it's doable already. What I need to do when painting an Image surface from a source rectangle to a destination rectangle is to select only a region of the source rectangle. I'll attach a patch for ImageCairo.
Attachments
Crop support in BitmapImage (2.80 KB, patch)
2012-02-27 02:13 PST, Philippe Normand
mrobinson: review-
Philippe Normand
Comment 1 2012-02-27 02:13:44 PST
Created attachment 128991 [details] Crop support in BitmapImage
Martin Robinson
Comment 2 2012-02-27 08:54:07 PST
Comment on attachment 128991 [details] Crop support in BitmapImage Is this used anywhere?
Philippe Normand
Comment 3 2012-02-27 08:57:00 PST
(In reply to comment #2) > (From update of attachment 128991 [details]) > Is this used anywhere? In the patch of bug 77087 :) I'm not sure this is the right approach though, I did this as an experiment and it seems to work but my knowledge of the Cairo stuff is a bit limited.
Philippe Normand
Comment 4 2012-03-06 02:11:48 PST
Alex, what do you think about this?
Martin Robinson
Comment 5 2012-03-06 06:56:00 PST
(In reply to comment #4) > Alex, what do you think about this? Perhaps ::crop could me a method on ImageGstreamer. Then you could just adjust the srcRect you pass into Image::draw.
Martin Robinson
Comment 6 2012-03-06 06:57:13 PST
Comment on attachment 128991 [details] Crop support in BitmapImage I think perhaps platform-independent Image is the wrong place for this. :/ Also it seems like a change like this should just go in the patch that depends on it -- instead of introducing code that is totally dead. Perhaps we can chat about another design.
Philippe Normand
Comment 7 2012-03-06 07:31:07 PST
(In reply to comment #5) > (In reply to comment #4) > > Alex, what do you think about this? > > Perhaps ::crop could me a method on ImageGstreamer. Then you could just adjust the srcRect you pass into Image::draw. the rect in MediaPlayerPrivateGStreamer::paint() is the destination rectangle, I think. Not the source rectangle. What I need to crop is the source.
Philippe Normand
Comment 8 2012-03-06 09:39:31 PST
Will do as Martin suggests. Thanks!
Note You need to log in before you can comment on or make changes to this bug.