History log of /haiku/src/apps/showimage/Filter.cpp
Revision Date Author Comments
# 6d34de21 24-Apr-2018 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Missing else in else if.


# 62e60219 04-May-2013 Jérôme Duval <jerome.duval@gmail.com>

ShowImage: initialize rgb_color.alpha field.


# 43ae7728 24-Jun-2012 Humdinger <humdingerb@gmail.com>

Style-fix I missed before. Thanks aldeck.


# 537a273c 24-Jun-2012 Humdinger <humdingerb@gmail.com>

Coding style changes, no functional change.
Hope all's OK, Filter.h is still mostly untouched as it's quite messy with
many exessive commenting.


# 5c6b9eb0 23-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

Some fixes for GCC 4.6 warning: variable set but not used


# 97d3d5a1 28-Dec-2010 Ryan Leavengood <leavengood@gmail.com>

CID 9936: Uninitialized members.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40004 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eddec292 21-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* applied patch by kaliber that fixes more than 100 warnings - thanks a lot!
Closes #6349

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37670 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 87df8902 14-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Don't use private BeOS syscalls.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31044 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c9e62886 23-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed every (hopefully) CID cases of delete where delete[] should have been used. CID 122, 123, 124, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 147, 148, 149, 150

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27703 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 880be331 28-Jan-2007 Ryan Leavengood <leavengood@gmail.com>

General changes:
- Fixed some formatting in the recently added resizing code.
- Changed the operation name for rotating counterclockwise to use that name
instead of anticlockwise. This makes the code consistent with the GUI.
- Reformatted the constants header to use an enum. Also removed the empty
constants cpp file.
- The QuitRequested handler in the app did not ask the windows to close, which
could cause modified images to be closed without prompting the user. Now it
does, which makes ShowImage more user friendly.

Changes to the image view:
- Added a member for keeping track of the type of image. This is mostly used in
properly updating the window's status bar when the image is changed (flipped,
rotated, etc.) This removes some hacky code I added before :)
- Removed the status parameter in the Notify method since it was only used for
the above image type status updating.
- Removed a redundant if in the mouse up handler.
- The key down handlers for moving to the next and previous image did not
properly prompt the user if the image had changed. I fixed this by sending a
message to the window where the prompting code resides. When adding this I
also created a few helper methods for sending messages to the window, which
removed some (small) repeated code through-out the class.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19994 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d9f6762d 17-Dec-2006 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

Integrated "resize" feature from Zetas version of ShowImage, however used our bilinear scaler instead of Zetas implementation and made ResizerWindow font sensitive and removed the radio buttons with predefined sizes. Kudos to Bernd Korz for providing the ShowImage Zeta source code under MIT license.
Moved menu item "As Desktop Background" into "Image" menu from "View" menu.
Removed unused metod ShowImageWindow::Zoom(...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19540 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 69eee339 25-Apr-2006 Ryan Leavengood <leavengood@gmail.com>

More changes to ShowImage:

1. The newly renamed "Flip Sideways" and "Flip Upside Down" have been renamed again to "Flip Left To Right" and "Flip Top To Bottom". This was after some feedback indicating a preference for the new names.

2. When dragging a selection the standard outlined rectangle is used for the dragging image instead of the alpha-blended bitmap of the selected part of the image if the selection rectangle is larger than 400x400 (taking into account scaling of the image.) This mimics the original ShowImage with the exception of the minimum size. The choice of 400x400 was fairly arbitrary. I may see about turning that value into some kind of hidden option.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17229 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61ddc257 20-Apr-2006 Ryan Leavengood <leavengood@gmail.com>

Fixes to ShowImage:

1. Renamed the Image menu items "Mirror Vertical" and "Mirror Horizontal" to "Flip Sideways" and "Flip Upside Down", respectively. This also involved changing the code to match the new names, for consistency.
2. Fixed a bug where zooming in and out would result in the image moving off center. This was due to the bitmap width and height not being recalculated after applying the zoom factor and therefore throwing off the calculations to find the rect for the center.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17182 a95241bf-73f2-0310-859d-f6bbb57e9c96


# da7bead8 14-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13140 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 147fecb0 17-Jan-2004 Matthew Wilber <mwilber@nowhere.fake>

Fixed application signature inconsistency and fixed a typo


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6117 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 491eb383 24-Dec-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

Fixed access to invalid bitmap bug.
Refactored code a little bit.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5746 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a8fc7138 25-Nov-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

- Implemented Floyd Steinberg dithering algorithm.
- Remembers "orientation" state (rotated, mirrored or inverted) in file attribute of image.
- Update recent documents menu every time the menu is opened.
- Bug fix and optimization in Filter.cpp.
- Moved image manipulation code from ShowImageView.cpp to Filter.cpp. So it can take advantage of multiple CPUs.
- Experimental: Write/remove thumbnail to/from file icons.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5480 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5e427b6a 22-Nov-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

- Made some settings persistent: Slide Show Delay, Scale Bilinear, Shrink/Zoom to Window, Show Caption in Full Screen Mode and PrintOptions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5441 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d3046f7d 19-Nov-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

- Made some settings persistent: Slide Show Delay, Scale Bilinear, Shrink/Zoom to Window, Show Caption in Full Screen Mode and PrintOptions persistent.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5415 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 19c76de4 18-Nov-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

- Rewrote bilinear scaling algorithm. The version that uses fixed point calculations is at least two times faster than the version that uses floating point calculations!
- Fixed off by one bugs.
- Replace "Fit to Window" with "Shrink to Window" and "Zoom to Window".


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5409 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 50d78f98 13-Nov-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

Bug fixed: virtual function must not be called in destructor.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5352 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 81b9c776 12-Nov-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

- scale bilinear (experimental: scaled image is too small by one pixel)
- bug fixes


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5347 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 62e60219cc0e6ca897d70524dddf3cbee49a29dc 04-May-2013 Jérôme Duval <jerome.duval@gmail.com>

ShowImage: initialize rgb_color.alpha field.


# 43ae7728689f08eaea882bd20f8e8d2afe3bec84 24-Jun-2012 Humdinger <humdingerb@gmail.com>

Style-fix I missed before. Thanks aldeck.


# 537a273cced14e2da799ae1e4c3474a9fd74d663 24-Jun-2012 Humdinger <humdingerb@gmail.com>

Coding style changes, no functional change.
Hope all's OK, Filter.h is still mostly untouched as it's quite messy with
many exessive commenting.


# 5c6b9eb00d0d623c12f72eb82a471cb4c71f4f33 23-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

Some fixes for GCC 4.6 warning: variable set but not used


# 97d3d5a1d38c4053ad0f1feeb87dc9f1029d7bec 28-Dec-2010 Ryan Leavengood <leavengood@gmail.com>

CID 9936: Uninitialized members.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40004 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eddec292d5dd8251a00851880e16e6a5c07c1e3f 21-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* applied patch by kaliber that fixes more than 100 warnings - thanks a lot!
Closes #6349

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37670 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 87df8902ac30e7d6e528356fb82b187bed03a6c4 14-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Don't use private BeOS syscalls.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31044 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c9e6288649ba36ff887f52fb62d4cd557fa9ef34 23-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Fixed every (hopefully) CID cases of delete where delete[] should have been used. CID 122, 123, 124, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 147, 148, 149, 150

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27703 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 880be3310db507c2aa34f93c86a450d590044638 28-Jan-2007 Ryan Leavengood <leavengood@gmail.com>

General changes:
- Fixed some formatting in the recently added resizing code.
- Changed the operation name for rotating counterclockwise to use that name
instead of anticlockwise. This makes the code consistent with the GUI.
- Reformatted the constants header to use an enum. Also removed the empty
constants cpp file.
- The QuitRequested handler in the app did not ask the windows to close, which
could cause modified images to be closed without prompting the user. Now it
does, which makes ShowImage more user friendly.

Changes to the image view:
- Added a member for keeping track of the type of image. This is mostly used in
properly updating the window's status bar when the image is changed (flipped,
rotated, etc.) This removes some hacky code I added before :)
- Removed the status parameter in the Notify method since it was only used for
the above image type status updating.
- Removed a redundant if in the mouse up handler.
- The key down handlers for moving to the next and previous image did not
properly prompt the user if the image had changed. I fixed this by sending a
message to the window where the prompting code resides. When adding this I
also created a few helper methods for sending messages to the window, which
removed some (small) repeated code through-out the class.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19994 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d9f6762d46c0e7c25d011460bef442ec2d00bfe9 17-Dec-2006 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

Integrated "resize" feature from Zetas version of ShowImage, however used our bilinear scaler instead of Zetas implementation and made ResizerWindow font sensitive and removed the radio buttons with predefined sizes. Kudos to Bernd Korz for providing the ShowImage Zeta source code under MIT license.
Moved menu item "As Desktop Background" into "Image" menu from "View" menu.
Removed unused metod ShowImageWindow::Zoom(...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19540 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 69eee339bad0aed4b9c4a99226a2cc0f64fb8513 25-Apr-2006 Ryan Leavengood <leavengood@gmail.com>

More changes to ShowImage:

1. The newly renamed "Flip Sideways" and "Flip Upside Down" have been renamed again to "Flip Left To Right" and "Flip Top To Bottom". This was after some feedback indicating a preference for the new names.

2. When dragging a selection the standard outlined rectangle is used for the dragging image instead of the alpha-blended bitmap of the selected part of the image if the selection rectangle is larger than 400x400 (taking into account scaling of the image.) This mimics the original ShowImage with the exception of the minimum size. The choice of 400x400 was fairly arbitrary. I may see about turning that value into some kind of hidden option.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17229 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61ddc257d2349c0b83abfad8da467c582939f657 20-Apr-2006 Ryan Leavengood <leavengood@gmail.com>

Fixes to ShowImage:

1. Renamed the Image menu items "Mirror Vertical" and "Mirror Horizontal" to "Flip Sideways" and "Flip Upside Down", respectively. This also involved changing the code to match the new names, for consistency.
2. Fixed a bug where zooming in and out would result in the image moving off center. This was due to the bitmap width and height not being recalculated after applying the zoom factor and therefore throwing off the calculations to find the rect for the center.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17182 a95241bf-73f2-0310-859d-f6bbb57e9c96


# da7bead8c62b4c854029ec019a2f13f6de887a5d 14-Jun-2005 Axel Dörfler <axeld@pinc-software.de>

Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13140 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 147fecb0dbfafc812eee546557276e0c6e6b3870 17-Jan-2004 Matthew Wilber <mwilber@nowhere.fake>

Fixed application signature inconsistency and fixed a typo


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6117 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 491eb383e07fde782a13303b12661511983a03f1 24-Dec-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

Fixed access to invalid bitmap bug.
Refactored code a little bit.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5746 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a8fc713847bb28899eca54d19c581895ec324edd 25-Nov-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

- Implemented Floyd Steinberg dithering algorithm.
- Remembers "orientation" state (rotated, mirrored or inverted) in file attribute of image.
- Update recent documents menu every time the menu is opened.
- Bug fix and optimization in Filter.cpp.
- Moved image manipulation code from ShowImageView.cpp to Filter.cpp. So it can take advantage of multiple CPUs.
- Experimental: Write/remove thumbnail to/from file icons.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5480 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5e427b6a8516ef2ffa0832e70509a5201c2e7d23 22-Nov-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

- Made some settings persistent: Slide Show Delay, Scale Bilinear, Shrink/Zoom to Window, Show Caption in Full Screen Mode and PrintOptions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5441 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d3046f7d46f0a7e9ceb022b01d62975abfea2b5d 19-Nov-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

- Made some settings persistent: Slide Show Delay, Scale Bilinear, Shrink/Zoom to Window, Show Caption in Full Screen Mode and PrintOptions persistent.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5415 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 19c76de4a069cc23e43426e2c32487732979d9ba 18-Nov-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

- Rewrote bilinear scaling algorithm. The version that uses fixed point calculations is at least two times faster than the version that uses floating point calculations!
- Fixed off by one bugs.
- Replace "Fit to Window" with "Shrink to Window" and "Zoom to Window".


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5409 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 50d78f98e540f0f440b270e3b51829605aee2fb0 13-Nov-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

Bug fixed: virtual function must not be called in destructor.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5352 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 81b9c776915e9da688dafc4f9097b9213d0be364 12-Nov-2003 Michael Pfeiffer <michael.w.pfeiffer@gmail.com>

- scale bilinear (experimental: scaled image is too small by one pixel)
- bug fixes


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5347 a95241bf-73f2-0310-859d-f6bbb57e9c96