Pelles C forum
C language => User contributions => Topic started by: Grincheux on February 10, 2016, 10:02:10 PM
-
(http://www.phrio.biz/download/ImagesViewer_1.jpg)
and
(http://www.phrio.biz/download/ImagesViewer_2.jpg)
The source is here (http://www.phrio.biz/mediawiki/Images_Viewer)
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.
-
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 : sqlite3_open_v2(":memory:",&hSQLite,SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,NULL)
then it creates the unique table "Images" like this : 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.
-
I can't explain why in program options I am obliged to duplicate the image list rather using the original one.
-
A good start. I look forward to seeing what improvements and additions you make.
John
-
There is a bug when deleting duplicates
The program is too slow.
-
The first version is finished! Many things to do again but it works. If you want to see some features go to here (http://www.phrio.biz/mediawiki/Images_Viewer) you can download an installation package or a 7zip file.
I have added images effects, filters and more.
(http://www.phrio.biz/ImagesViewer/Presentation/Presentation_00001.jpg)
I hope you like cheerleaders, me I love.
-
The first version is finished! Many things to do again but it works. If you want to see some features go to here (http://www.phrio.biz/mediawiki/Images_Viewer) you can download an installation package or a 7zip file.
I have added images effects, filters and more.
(http://www.phrio.biz/ImagesViewer/FirstScreen.jpg)
I hope you like cheerleaders, me I love.
You put that together quickly.
It's not just a viewer now is it.
John
-
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.
-
Update available for Pelle's C and Visual Studio Community 2015.
Added mirroring options :-*
Available here (http://www.phrio.biz/mediawiki/Images_Viewer)
-
(http://www.phrio.biz/ImagesViewer/Presentation/Presentation_00005.jpg)
Added contours detection
But I search for other algorythms, this one is a bit simple.
Images Viewer web page (http://www.phrio.biz/mediawiki/Images_Viewer)
Images Viewer Gallery (http://www.phrio.biz/mediawiki/Images_Viewer_Gallery)