diff --git a/src/apps/showimage/ShowImageView.cpp b/src/apps/showimage/ShowImageView.cpp index ea8ea79232..a65a083dff 100644 --- a/src/apps/showimage/ShowImageView.cpp +++ b/src/apps/showimage/ShowImageView.cpp @@ -255,6 +255,7 @@ ShowImageView::Notify(const char* status) if (status != NULL) { msg.AddString("status", status); } + msg.AddInt32("colors", fBitmap->ColorSpace()); BMessenger msgr(Window()); msgr.SendMessage(&msg); diff --git a/src/apps/showimage/ShowImageWindow.cpp b/src/apps/showimage/ShowImageWindow.cpp index d7f88f57f6..e2ceb6f668 100644 --- a/src/apps/showimage/ShowImageWindow.cpp +++ b/src/apps/showimage/ShowImageWindow.cpp @@ -545,6 +545,13 @@ ShowImageWindow::MessageReceived(BMessage *pmsg) pcurItem->SetMarked(true); } } + + // Disable the Invert menu item if the bitmap color space + // is B_CMAP8. (B_CMAP8 is currently unsupported by the + // invert algorithm) + color_space colors = B_NO_COLOR_SPACE; + pmsg->FindInt32("colors", reinterpret_cast(&colors)); + EnableMenuItem(fBar, MSG_INVERT, (colors != B_CMAP8)); BString str; if (pmsg->FindString("status", &str) == B_OK)