PhotoEXIF
Posted
#1
(In Topic #337)
Guru

The program includes 'exiftool' which makes it a bit big for the forum so you can find it here. (There are 2 compressed files but they contain the same program.)
<IMG src="http://www.cogier.com/gambas/PhotoEXIF.png">
</IMG>
Posted
Regular

Initial thoughts; it looks great!
I may have font issues as the EXIF data looks bold & larger than necessary. Also the status message is clipped and font looks a bit big.
I don't really understand the Auto/Man switch. I would have thought this should switch itself to Man when I hit one of the 90deg left/right buttons. Maybe a rotated image would be on its side when set to Man?
Not sure whether the 'mode' is of any use.
Would like to be able to set the default folder path (e.g. I might want it to open in {say} /home/steve/photography/2019).
Not sure about the 'close the program button'. I don't think its necessary, but if its needed it should probably be on extreme left or right, rather than in among the other buttons.
Note: I reserve the right to change my mind about any of the above, when I take a second look tomorrow.
<IMG src="%5Battachment=0%5DPhotExif.png%5B/attachment%5D">
Posted
Guru

Anyway onward…..
OK I wondered. I will change that after 'will spend more time on it tomorrow.'I may have font issues as the EXIF data looks bold & larger than necessary. Also the status message is clipped and font looks a bit big.
I think this is a good feature. This will automatically rotate a photo if necessary, or not if on Manual. Seems to work well, see grandchild that wont keep the fancy dress on until I take the picture :cry:I don't really understand the Auto/Man switch.
<IMG src="http://www.cogier.com/gambas/esme.png">
</IMG>You are probably correct. I spent some time working out what 'Mode' was all about and adding my knowledge to the Gambas help files. So added this 'feature' as I understood it but it only shows its use on small pictures. I thinks I will remove it based on your comments.Not sure whether the 'mode' is of any use.
The last folder used on closing the program is saved and will be reopened on restarting the program, or do you have a different wish?Would like to be able to set the default folder path (e.g. I might want it to open in {say} /home/steve/photography/2019).
Good point, I'll look into that.Not sure about the 'close the program button'. I don't think its necessary, but if its needed it should probably be on extreme left or right, rather than in among the other buttons.
Equal to 'What ever happens it nothing to do with me gov!'Note: I reserve the right to change my mind about any of the above, when I take a second look tomorrow.
I look forward to more constructive criticism and thanks again.
Posted
Regular

Posted
Regular

<IMG src="">
I added a delete button and disabled it, but as soon as the program runs it's enabled. Here is the routine that I used. You can use it or make a better solution.
Code (gambas)
Posted
Regular

Code (gambas)
Posted
Regular

cogier said
Thanks and thanks again for the input. It is very infrequent that I get any feedback on programs I have written even though I include an email address. My most popular Gambas Farm program BarcodeCreator has had 1364 downloads to date and not a single comment.
Most people don't provide feedback. Those that do often fall into 2 groups:-
- Those that feel very strongly about something (the extremists).
- Those that like the sound of their own voice (Err…ok, that's me).
So you may need to clock up thousands of downloads before you get feedback.
…and of course people may be happy, so have nothing much to say!
At least you haven't been beaten up yet (see my recent rant: Captain Bodgit: Never look a gift horse in the mouth)
I tend to see ambiguity in a lot of things that others don't (its probably some kind of …ism); with labelled push buttons, I'm never sure whether the text shows the current state or what happens when you press it…that's why I prefer radio buttons or tick boxes.I think this is a good feature. This will automatically rotate a photo if necessary, or not if on Manual. Seems to work well, see grandchild that wont keep the fancy dress on until I take the picture :cry:I don't really understand the Auto/Man switch.
Would like to be able to set the default folder path (e.g. I might want it to open in {say} /home/steve/photography/2019)…<COLOR color="#BF0000">.Did I say that?</COLOR>
I look forward to more constructive criticism and thanks again.
…I'll be back!
Posted
Regular

"gb.gui.qt: warning: 'gb.qt5' component not found, using 'gb.qt 4' instead"
…so that may be linked to my font/presentation issue.
You have "Bookmark current directory" and the program stores the last used path, so that's all covered.
I'd like to be able to use the up/down arrow keys to move through the images in a given directory.
For much of the time I'm only interested in a sub-set of EXIF data (e.g. Exposure, F-stop, ISO, focal length) so it would be nice to be able to config this as a user setting.
I don't have any photos with GPS data, but if you'd like to post a few, I'll test that aspect as well.
conclusion
As a simple jpeg viewer, this program works well, has a pretty clean user interface, and your code (as always) looks neat & tidy.
If you are looking for ideas for expansion, I'd say consider adding a histogram and a way to launch an external (user selectable) image editor.
If you really want to up-your-game consider this; an increasing number of people are now taking pictures in a RAW format. However, all RAW files contain a jpeg image version which allows viewers (like Geeqie) to quickly open and display images without consuming GBytes of RAM.
Operating as a RAW viewer may be drifting too far away from your original spec, if so, please ignore.
Posted
Regular

This works:-
Code
exiftool -b -JpgFromRaw \{Nikon raw.NEF} > test.jpgWhile this works:-
Code
exiftool -b -PreviewImage \{Olympus raw.ORF} > test.jpg
Posted
Guru

Stay tuned…..
Posted
Guru

Mode feature - Removed.
Extra program close button - Gone.
Right click delete file feature - Added.
Auto rotate - Changed to a CheckBox .
Key scrolling feature on FileView - Added.
EXIF '-common' feature - Added.
You can now click the main photo to pop it out and click it again to close.
Font size and bold text - Removed.
Note that most of the internal window components are re-sizeable.
The program uses the excellent 'Task' feature to collect the EXIF data in the background which uses a separate processor core.
I was looking at the Histogram option but it seems that you, SteveDee, have the only example on the web. Unfortunately I can't work out how to use it, help required please.
Regarding RAW images, if you have some do they not display the EXIF data?
The idea of a button to an external photo editor is a sound idea but each distro has different ones. I suppose I could ask the user to point to their favorite editor. - Requires more thought.
The idea of user selecting the type of data displayed is possible but would be quite a task. There is already a search box to fine tune the displayed data. - Requires more thought.
I think that covers it all so far. Thanks SteveDee and Cage for your input.
Posted
Regular

Code (gambas)
- Me.Center
- 'TextBox1.SetFocus
- btnSelect_Click
- 'Message("You Selected " & ListBox1.Text)
- Global.CopyCmd = ListBox1.Text
- 'ListBox1.Clear
- ' ListBox1.SetFocus
- SearchFor = TextBox1.Text
- ListBox1.Add("/usr/bin/" & fileName)
- Global.CopyCmd = ListBox1.Text
<IMG src="">
Posted
Regular

I just noticed that I should see "Show" top left. This didn't appear at all in my first screen shot (see earlier post) and now I see "how". I also get a message complaining about my browser (…that may be due to some security setting or NoScript or the wrong browser being selected on my system).
I was thinking about those little triangle things in the Gambas IDE that we use to collapse/retrieve panels, and wondered if they could be used in this application.
The folder tree view is annoying (as it often is on other apps). Its too narrow when you want to see it, and too wide when you don't.
I added this code:-
Which seems to solve these issues (well…for me, anyway).
This kind of approach may allow you to remove the Show: Folder/EXIF/GPS checkboxes altogether.
Posted
Guru

Any advice on Histograms?
Cage, thanks for the code I will look at that later.
Posted
Regular

Yes, Bing is OKcogier said
Steve did you try the Bing maps?
Any advice on Histograms?
Take a look at my code here; Captain Bodgit: Gambas: Improving the PhotoViewer
<COLOR color="#BF0000">EDIT: my comment in the article above about the Red & Blue histograms problem was subsequently fixed after I spoke to Benoit in Oct 2012. I think he just crossed them over.</COLOR>
Posted
Regular

Posted
Guru

Histogram - Added. Matt and I spent yesterday afternoon working it all out, thanks Steve for your work on this, it guided us in the right direction. I have taken the basics and will put it on the Farm as an example.
Picture edit feature - Added. Please look at the EdList file and let me know if there are any other photo editors I have missed. The list is used to see what you might already have on your computer.
The problem with the buttons being 'squashed' has been addressed. I have moved them and if the window area is too small they will drop down onto a new line.
Cage just a small point regarding your code.
This can be simplified to.
As before please let me have your comments.
<IMG src="https://www.cogier.com/gambas/PhotoEXIF1.png">
</IMG>
Posted
Regular

Posted
Regular

I'm only left with 2 or 3 very minor points.
Although most people will only have picture files in their picture folders, I often end up with pictures in a mixed file folder (e.g. the Desktop, Downloads & so on). So I suggest you set up the FileView Filter, e.g.
Code (gambas)
- FileView1.Filter = ["*.bmp", "*.gif", "*.jpg", "*.png", "*.tif"]
I'd also suggest moving the Help icon to join the others. This would allow the FileChooser & FileView to fill the gap 'floor to ceiling'.
Also, I'd swap the edit icon for the 'brush & palette' icon (I think its just called "color").
P.S. I never use the one line IF…Then… as I think the If…EndIf block stands out better in the code and its easier to enter a breakpoint if needed.
And anyway, the block auto completes after typing Then<enter>
…Or if<tab> when "Code Snippets" are enabled.
Posted
Guru

Although most people will only have picture files in their picture folders, I often end up with pictures in a mixed file folder (e.g. the Desktop, Downloads & so on). So I suggest you set up the FileView Filter, e.g. FileView1.Filter = ["*.bmp", "*.gif", "*.jpg", "*.png", "*.tif"]
I thought about this and maybe I could add it as an option. The reason I did not do this is because many other files can have a wealth of EXIF information. Have a look at mp4 files for example.
I'd also suggest moving the Help icon to join the others. This would allow the FileChooser & FileView to fill the gap 'floor to ceiling'.
Good point! I have already posted this on the Farm so I might wait a while before I update this. (UPDATE. I have updated this on the Farm as I found a small bug and there had only been one download.)
Also, I'd swap the edit icon for the 'brush & palette' icon (I think its just called "color").
I had a look but could not work out to which one you are referring. 'Color' on my system looks like this <IMG src="http://www.cogier.com/gambas/color.png">
</IMG>. 'Edit' seemed appropriate but it's all subjective… :!: ..Or if<tab> when "Code Snippets" are enabled.
I didn't know that one. You learn something every day.
Posted
Regular

cogier said
Also, I'd swap the edit icon for the 'brush & palette' icon (I think its just called "color").
I had a look but could not work out to which one you are referring. 'Color' on my system looks like this <IMG src="http://www.cogier.com/gambas/color.png"></IMG>. 'Edit' seemed appropriate but it's all subjective… :!:
My "color" icon looks like this;
I don't fully understand how Gambas Stock icons work.
I know the Stock class (gb.form) returns system icons, so these icons must be Theme dependant. However, on my system the "color" icon is actually /usr/share/icons/gnome/24x24/categories/applications-graphics.png
..Or if<tab> when "Code Snippets" are enabled.
I didn't know that one. You learn something every day.
I'm not a big user of Code Snippets (…but then I'm not a big user of Gambas) but I use some for declarations like; db<tab>
…if I remember.
Posted
Administrator

When I run it from the IDE, the button images are not showing.
I just wanted to take a quick look at the app, but I don't have time right now to dig into the above issues as it's late and I need to get up early, but I wanted to post this info while I had the chance. Maybe this weekend I'll be able to have some Gambas play time.
System: Debian 10, KDE 5
Application colors: Breeze Dark
Desktop theme: Crown Blue
Icon theme: Oxygen
Posted
Guru

SteveDee
The problem of 'Your browser needs to be updated…' is due to you not having QT5 installed. I used Synaptic and installed: -
gambas3-gb-qt5
gambas3-gb-qt5-ext
gambas3-gb-qt5-opengl
gambas3-gb-qt5-webkit
Once that's done you will, hopefully, find it works OK.
I have noticed that the icons change depending on which distro you're running so I presume that Gambas uses the distro's theme icons.
Regarding the 'Snippets' the one I use the most is 'ps<Tab>' which gives you: -
Got2BeFree
I have tried various distros and I think the Gambas 'Download and install' feature is broken. The problem of the missing folder is the 'exiftool' folder that comes with the program!
The missing buttons: -
I installed Debian 10 KDE 5 and then started changing the settings 'Application colors: Breeze Dark' all OK, 'Desktop theme: Crown Blue' still OK, 'Icon theme: Oxygen' - Buttons gone!!
It seems that Gambas can't cope with that combination.
Cage
I hope you like my version of finding suitable photo editing software, you pointed me in the right direction, thanks.
Others
Don't close the program on an empty directory as this will generate an error when restarting the program and you will need to delete the 'conf' file to continue. I will update soon. (Now updated on the Farm)
Still looking for feedback on the names of picture editing software I might have missed, see the 'EdList' file in the program. Is your favorite one listed?
Posted
Administrator

cogier said
Got2BeFree
I have tried various distros and I think the Gambas 'Download and install' feature is broken. The problem of the missing folder is the 'exiftool' folder that comes with the program!
Created an install package (.deb) and still have the same error when starting the app.
cogier said
The missing buttons: -
I installed Debian 10 KDE 5 and then started changing the settings 'Application colors: Breeze Dark' all OK, 'Desktop theme: Crown Blue' still OK, 'Icon theme: Oxygen' - Buttons gone!!
It seems that Gambas can't cope with that combination.
The buttons are still there and the icons are still there. Black icons don't show up on dark themes.
(On a side note, I've noticed the Gambas IDE doesn't honor icon choice setting in the preferences.)
Posted
Regular

1 guest and 0 members have just viewed this.









