diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-03-02 20:59:13 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-03-02 20:59:13 +0000 |
commit | 6eccd043f22d9ddfa6418c4342e0a9fd5476a7dd (patch) | |
tree | e7c671e94b63ed713c34a88e8dc57ebf5d3cfd0e /gtk2_ardour/imageframe_view.cc | |
parent | a453d545080c5e8ec0cb54161ee826ad479d6d69 (diff) |
ICS (image compositor socket) patches from robin gareus, to keep ICS alive in 2.X; variations on giso's proposed fix for #1731 (x-fade clicking)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4720 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/imageframe_view.cc')
-rw-r--r-- | gtk2_ardour/imageframe_view.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gtk2_ardour/imageframe_view.cc b/gtk2_ardour/imageframe_view.cc index f35381301e..d1291472a4 100644 --- a/gtk2_ardour/imageframe_view.cc +++ b/gtk2_ardour/imageframe_view.cc @@ -67,7 +67,7 @@ ImageFrameView::ImageFrameView(const string & item_id, uint32_t width, uint32_t height, uint32_t num_channels) - : TimeAxisViewItem(item_id, *parent, *tv, spu, basic_color, start, duration, + : TimeAxisViewItem(item_id, *parent, *tv, spu, basic_color, start, duration, false, TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowNameText| TimeAxisViewItem::ShowNameHighlight| TimeAxisViewItem::ShowFrame| @@ -86,7 +86,16 @@ ImageFrameView::ImageFrameView(const string & item_id, memcpy(the_rgb_data, rgb_data, (width*height*num_channels)) ; ArtPixBuf* pbuf ; - pbuf = art_pixbuf_new_rgba(the_rgb_data, width, height, (num_channels * width)); + if (num_channels==3) + pbuf = art_pixbuf_new_rgb(the_rgb_data, width, height, (num_channels * width)); + else if (num_channels==4) + pbuf = art_pixbuf_new_rgba(the_rgb_data, width, height, (num_channels * width)); + else { + ; // error unsupported image data format + art_free(the_rgb_data); + std::cerr << "imageframe_view: unsupported image data format" << std::endl; + return; + } imageframe = 0 ; //calculate our image width based on the track height |