PhotoEXIF

User avatar
cogier
Site Admin
Posts: 349
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: PhotoEXIF

Post by cogier » Friday 08th November 2019 8:13pm

OK. Updated program and three pictures complete with GPS data (2 in Guernsey, 1 in Berlin) are here.

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. :D

cage
Posts: 35
Joined: Monday 02nd September 2019 5:47am
Location: Phoenix Arizona

Re: PhotoEXIF

Post by cage » Saturday 09th November 2019 4:19am

cogier it's looking great. Very nice work. I have a quick launcher program that allows the user to look up a program to place it into an index file. You could do something similar in a config file in your configs folder. Look at this code I use and modify it to your liking for your program. Should give you a good place to start.
Public Sub Form_Open()
  
   Me.Center
   'TextBox1.SetFocus
 btnSelect.Enabled = False
End


Public Sub Form_KeyPress()
   
   If Key.Code = Key.Esc Then
      Me.Close
   Endif
   If ListBox1.Text <> "" And Key.Code = Key.Return Then
     btnSelect_Click
   Endif
   
End

Public Sub ListBox1_DblClick()

   'Message("You Selected " & ListBox1.Text)
   Global.CopyCmd = ListBox1.Text
   

   Me.Close

End

Public Sub btnCancel_Click()

   Me.Close

End

Public Sub btnSearch_Click()

   Dim SearchFor As String
   Dim fileName As String

   'ListBox1.Clear
   ' ListBox1.SetFocus
   
   SearchFor = TextBox1.Text

   If SearchFor = "" Then
      Message.Title = "Error"
      Message.Error("You Need To Enter Search Data")
      Return
   Endif

   For Each fileName In Dir("/usr/bin/", "*", gb.File)
      If InStr(UCase(filename), UCase(SearchFor)) Then
         ListBox1.Add("/usr/bin/" & fileName)
      Endif

   Next
btnSelect.Enabled = True
End

Public Sub btnSelect_Click()

         If ListBox1.Text = "" Then
      Message.Title = "Error" 
      Message.Error("You Need To Click on File First")
      Return
   Endif
      Global.CopyCmd = ListBox1.Text
   

   Me.Close

End


Image
Attachments
fileSearch.png
fileSearch.png (29.43 KiB) Viewed 162 times

User avatar
stevedee
Posts: 140
Joined: Monday 20th March 2017 6:06pm

Re: PhotoEXIF

Post by stevedee » Saturday 09th November 2019 11:28am

I really like these changes Charlie.

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).
PhotoExif1.png
PhotoExif1.png (432.07 KiB) Viewed 154 times
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.
GambasIDE.png
GambasIDE.png (33.06 KiB) Viewed 154 times
I think the way they disappear in the IDE is too subtle, but in your app you could use them for the EXIF window but make sure they are visible all the time.

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:-
Public Sub DirChooser1_Enter()
  
  HSplit2.Layout = [100, 0]
  
End

Public Sub DirChooser1_Leave()
  
  HSplit2.Layout = [5, 95]
  
End
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.

User avatar
cogier
Site Admin
Posts: 349
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: PhotoEXIF

Post by cogier » Saturday 09th November 2019 12:07pm

Steve did you try the Bing maps? Regarding the 'Show' issue you can resize the directory and file windows which should solve your problem.

Any advice on Histograms?

Cage, thanks for the code I will look at that later.

User avatar
stevedee
Posts: 140
Joined: Monday 20th March 2017 6:06pm

Re: PhotoEXIF

Post by stevedee » Saturday 09th November 2019 1:26pm

cogier wrote:
Saturday 09th November 2019 12:07pm
Steve did you try the Bing maps?
Yes, Bing is OK
Any advice on Histograms?
Take a look at my code here; http://captainbodgit.blogspot.com/2012/ ... iewer.html

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.

cage
Posts: 35
Joined: Monday 02nd September 2019 5:47am
Location: Phoenix Arizona

Re: PhotoEXIF

Post by cage » Saturday 09th November 2019 9:12pm

Your welcome cogier. You helped me so I am glad to help you when ever I can. :D

User avatar
cogier
Site Admin
Posts: 349
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: PhotoEXIF

Post by cogier » Sunday 10th November 2019 4:22pm

Updated program is here.

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.
If Key.Code = Key.Esc Then
      Me.Close
   Endif
This can be simplified to.
If Key.Code = Key.Esc Then Me.Close
As before please let me have your comments.

Image

cage
Posts: 35
Joined: Monday 02nd September 2019 5:47am
Location: Phoenix Arizona

Re: PhotoEXIF

Post by cage » Wednesday 13th November 2019 3:15am

Cogier as always your suggestions very much welcome. My biggest problem is that I am an old school programmer. I do appreciate your suggestions and end up using them, thank you. As for your program it's really coming together really nicely. As it stands right now I would put it the top 3 programs that are available. It is now going to be used on my system. I do have one question though. Can you explain exactly how the settings command works. I have search for an answer but what I have found were very vague. I managed to make it work but it's not putting the file where would like it. If you could help out with that I would really be grateful.

User avatar
stevedee
Posts: 140
Joined: Monday 20th March 2017 6:06pm

Re: PhotoEXIF

Post by stevedee » Wednesday 13th November 2019 6:06pm

Just checked the latest version, and its looking really good. :D

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

User avatar
cogier
Site Admin
Posts: 349
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: PhotoEXIF

Post by cogier » Thursday 14th November 2019 1:55pm

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 Image. '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. :D

Post Reply