History log of /haiku/src/apps/showimage/Filter.h
Revision Date Author Comments
# 2ca13760 20-Aug-2021 Coldfirex <sakison@gmail.com>

Mass updating of OpenBeOS text to Haiku

No functional code altered.

https://dev.haiku-os.org/ticket/17197

Change-Id: I75cc74f6be0ad968fd77c31fbe5b0f650a6fe9e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4364
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 73ad2473 05-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

Remove remaining unnecessary 'volatile' qualifiers


# 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.


# 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


# 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


# 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


# 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


# 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


# 73ad2473e7874b3702cf5b0fdf4c81b747812ed9 05-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

Remove remaining unnecessary 'volatile' qualifiers


# 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.


# 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


# 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


# 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


# 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


# 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