Large Image Viewer

Developed or developing a new product in PureBasic? Tell the world about it.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Large Image Viewer

Post by JHPJHP »

Updated:
- added Rotate Image
- improved Color Filters
- various other enhancements
- squashed a bug

Rotate Image
From the context-menu the following new options have been added.
- Flip Vertical
- Flip Horizontal
- 90 Degrees
- 180 Degrees
- 270 Degrees

Rotated Image values are not saved to the XML file, and will not survive a restart.
In order to keep the image rotated after a restart, first save the image, which will then become the default image.
When an image is rotated, scroll position and detached map locations are reset, and will not survive a restart unless the image is first saved.

Color Filters
The numerous color algorithms now better support images with transparency.
Windows Services & Other Stuff and Spider Web Drawing have also been updated.
Last edited by JHPJHP on Tue Jan 24, 2023 6:47 am, edited 3 times in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Large Image Viewer

Post by JHPJHP »

Updated:
- fixed Color Filters

Color Filters
Patched a small bug in the numerous color algorithms; Windows Services & Other Stuff (ColorConversion) was also updated.

Image
Last edited by JHPJHP on Tue Jan 24, 2023 6:46 am, edited 4 times in total.
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Large Image Viewer

Post by BarryG »

Thanks for the update, JHPJHP!
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Large Image Viewer

Post by ChrisR »

Your large image viewer is just great, thanks also for the update :)
User avatar
Lord
Addict
Addict
Posts: 847
Joined: Tue May 26, 2009 2:11 pm

Re: Large Image Viewer

Post by Lord »

Maybe the Image map should instantly reflect any
repositioning by the scrollbar.
Image
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Large Image Viewer

Post by JHPJHP »

Hi BarryG, ChrisR,

Thank you as always for your positive comments.

---------

Hi Lord,
Lord wrote:Maybe the Image map should instantly reflect any repositioning by the scrollbar.
Thank you for pointing this out; up to this point I hadn't noticed that the map didn't update until the scrollbar was released.

Originally, this was only meant to demonstrate how to scroll an image within a ScrollAreaGadget without using the scrollbars.
The Show Scrollbars context menu option was an after-thought...

Updated: Map will now instantly reflect any repositioning by the scrollbars.
Last edited by JHPJHP on Wed Apr 06, 2022 9:14 pm, edited 1 time in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Large Image Viewer

Post by JHPJHP »

Updated:
- improved Set Viewer Size (context menu option)
- added Drag & Drop (image onto ScrollAreaGadget)
- added SysTray Icon (right-mouse-click context menu)
- various minor enhancements

Set Viewer Size
Previously a manual restart was required; was replaced with the option to auto restart.
Last edited by JHPJHP on Tue Jan 24, 2023 6:49 am, edited 3 times in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Large Image Viewer

Post by JHPJHP »

Updated:
- improved Color Filters
- added Save Image > Display Filtered context menu option

Color Filters
The speed for applying color filters has more then doubled; see here for more information.

NB*: Spider Web Drawing has also been updated with the improved Color Filters.

Save Image > Display Filtered
Select an image mask (file) to filter parts of another image to transparency, saving the modified image to a user-defined PNG.

Image Filter: cloud.png, Color Filter: sepia (transparent areas shown as black)
Image
Last edited by JHPJHP on Tue Jan 24, 2023 6:45 am, edited 1 time in total.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Large Image Viewer

Post by JHPJHP »

Updated:
- removed flicker
- squashed a bug when saving with filter

While testing the application in the new beta version of PureBasic, I noticed a prevalent flicker when setting the color filters, resizing, etc.
After various changes and a few improvements, it seems that the flicker is gone; tested on both Windows 10 and Windows 11.

Not sure if the programs stability extends outside my own environment.

1. Use the context menu to open the image and set the various color filters.
2. Use the arrow keys to resize the image; can also be set from the context menu.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Large Image Viewer

Post by JHPJHP »

Updated:
- some minor improvements

Noticed when the Image Map was detached and an area on the map was double-clicked, the map would show a slight flicker.
- holding the left-mouse-button down will make the window semi-transparent, dragging the mouse will move the window
- double-clicking an area of the map will center the main image to that location

Updated the algorithm to better distinguish between a single click and a double-click; the issue was probably always there, but I didn't noticed it.

NB*: Free executables (x86/x64) can be downloaded from My PureBasic Stuff; see FREE STUFF.

Image
Last edited by JHPJHP on Tue Jan 31, 2023 6:16 pm, edited 3 times in total.
User avatar
Caronte3D
Addict
Addict
Posts: 1027
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Large Image Viewer

Post by Caronte3D »

You are doing much changes noticed by using the new beta... I'm curious what kind of changes are 🤔
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Large Image Viewer

Post by JHPJHP »

Hi Caronte3D,

My first post after Beta 1 was released sufficiently described the problem.
My second post after Beta 2 was released has been updated with additional information.

I don't often use the things I've written, they start off as an itch and I scratch until satisfied. But when a new version of PureBasic is released, I revisit my various scripts and programs to see if anything has changed or could potentially be improved.

This time around not only was I testing against PureBasic versions, but my computers OS was also updated from Windows 10 to 11.

In short, the updates may or may not be related to the beta release, it's just when I do most of my testing.

-----------------------------------------

Updated:
- fixed a small bug

Occurred when opening the program after a previously loaded image, set with a color filter, was deleted or moved.
User avatar
Caronte3D
Addict
Addict
Posts: 1027
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Large Image Viewer

Post by Caronte3D »

Thanks for the clarification :wink:
Locked