NO

Author Topic: A skeleton for an image viewer  (Read 2992 times)

Grincheux

  • Guest
A skeleton for an image viewer
« on: February 10, 2016, 10:02:10 pm »

and


The source is here

It is a small viewer that displays images using an listview (icon).
While it loads the image it shows a dialog box telling the name of the loading file.
When you double-click on a icon it opens a big window taht you can close in making a double click anywhere, or by pressing the escape key or using the system menu or when the window looses the focus.

I use the libraries used by XnView (GFL SDK 3.40)

It can be improved, and that is what I will do.
If you have ideas, I accept.

Thank.
« Last Edit: February 18, 2016, 08:15:21 pm by Grincheux »

Grincheux

  • Guest
Re: A skeleton for an image viewer
« Reply #1 on: February 14, 2016, 03:08:11 pm »
Added two options :
- Find dupilcates
- Sort

*** Find Duplicates ***

- File Bits : The program reads the file and computes the SHA2 for all the datas
- Image Bits : The program load the image in memory for creating a bitmap then it retrieves the images bits to compute the SHA2

These options are not similar because a JPEG file and a BMP file will have differents file bits but the same image bits.

*** Sort ***

The image size is the member of BitmapInfo.bmiHeader.biSizeImage.
The ratio is computed like this : ((double) _dwImageWidth) / ((double) _dwImageHeight).
The image width is equal to BitmapInfo.bmiHeader.biWidth.
The imahe height is equal to BitmapInfo.bmiHeader.biHeight.

The database is created "IN MEMORY" by the command :
Quote
sqlite3_open_v2(":memory:",&hSQLite,SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,NULL)
then it creates the unique table "Images" like this :
Quote
sqlite3_exec(hSQLite,szSQL_CreateTable,NULL,NULL,&_lpszMsg)

Image Width : Sort on the image with only
Image Height : Sort on the image height only
Image Width & Height : Sort ont the image width and for the same width it sorts on the image height
Image Height & With : Sort ont the image height and for the same height it sorts on the image width
Image Ratio : Sort on the image ratio. Useful for finding duplicates.
If images have differents file size but the ratio is equal that helps to find a similar image smaller or bigger
File Bits : Sort on the file datas. Compute SHA2
Image Bits : Sort on the bitmap bits. Compute SHA2
File Bits & Image Bits : Sort on the file datas then sorts on the image datas.
Image Bits & File Bits : Sort on the image datas then sorts on the file datas.
File Size & Image Size : Sort on the file size the for the same file size it sorts on the image size.
Image Size & File Size : Sort on the image size the for the same image size it sorts on the file size.
File Size : Sort on the file size.
Image Size : Sort on the image size (The size of the image in memory)
File Name : Sort the file on the file name
Strict (No Collisions) : Sort on File size SHA2 and file KECCAK.
« Last Edit: February 14, 2016, 03:09:58 pm by Grincheux »

Grincheux

  • Guest
Re: A skeleton for an image viewer
« Reply #2 on: February 14, 2016, 03:14:24 pm »
I can't explain why in program options I am obliged to duplicate the image list rather using the original one.

JohnF

  • Guest
Re: A skeleton for an image viewer
« Reply #3 on: February 14, 2016, 06:09:40 pm »
A good start. I look forward to seeing what improvements and additions you make.

John

Grincheux

  • Guest
Re: A skeleton for an image viewer
« Reply #4 on: February 14, 2016, 06:42:44 pm »
There is a bug when deleting duplicates
The program is too slow.

Grincheux

  • Guest
Re: A skeleton for an image viewer
« Reply #5 on: February 18, 2016, 11:06:11 am »
The first version is finished! Many things to do again but it works. If you want to see some features go to here you can download an installation package or a 7zip file.

I have added images effects, filters and more.



I hope you like cheerleaders, me I love.
« Last Edit: March 23, 2016, 10:15:24 am by Grincheux »

JohnF

  • Guest
Re: A skeleton for an image viewer
« Reply #6 on: February 19, 2016, 11:18:21 am »
The first version is finished! Many things to do again but it works. If you want to see some features go to here you can download an installation package or a 7zip file.

I have added images effects, filters and more.



I hope you like cheerleaders, me I love.

You put that together quickly.

It's not just a viewer now is it.

John

Grincheux

  • Guest
Re: A skeleton for an image viewer
« Reply #7 on: February 19, 2016, 12:59:33 pm »
It's more than a viewer. In this version I tryed to show all tle possiblities of GFLSDK (XnView). In the version I write I added border for selecting images, mirroring and corrected some bugs. I also have many PDF to read to install others filters. I would like to have a color border detection (Laplace...). After I will implement tooltips and contextual menus. One other thing to do is to take example on what Timo does for differents languages.

As I said before, many things to do.

When one is working I will inform the forum.

I forgot, I would like to be able to treat 8BF filters but I don't know I to do, Google is not my friend for this research, nothing found, no code. If someone could help me.

I very often visit your page and did not find what I am looking for?
Thank you fo your comments.
« Last Edit: March 23, 2016, 10:14:43 am by Grincheux »

Grincheux

  • Guest
Re: A skeleton for an image viewer
« Reply #8 on: February 19, 2016, 02:03:27 pm »
Update available for Pelle's C and Visual Studio Community 2015.
Added mirroring options :-*

Available here

Grincheux

  • Guest
Re: A skeleton for an image viewer
« Reply #9 on: February 20, 2016, 06:13:26 pm »


Added contours detection

But I search for other algorythms, this one is a bit simple.

Images Viewer web page
Images Viewer Gallery
« Last Edit: March 23, 2016, 11:03:58 am by Grincheux »