15,908,634 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Jozi68 (Top 8 by date)
Jozi68
8-Mar-12 13:46pm
View
15 years ago I would have written a small DLL that accepts x,y coordinates, and returns the color of whatever it finds at that position. Then I simply would have called this DLL from my VB6 application.
Today I don't know where to start...
Jozi68
8-Mar-12 13:05pm
View
Thank you OriginalGriff. It works if I click on the form; it returns the background color of the form.
What I actually need is to supply the x,y coordinates, and then get the color. This must be ouside the application, e.g on a photo that is open in Paint.
Jozi68
3-Mar-12 14:48pm
View
Thanx for the reply.
What does tag it mean?
What is WPF?
Where does the system.drawing command go?
When I said set-by-step, I meant step-by-step
Jozi68
9-Feb-11 5:52am
View
I think I got it right. Code is pasted below. However, I don't know how to interpret the altitude. I get an answer of 56844, and it should be: 1386.439.
Also, my string is being concatenated, I'm not sure why.
[ Dim byte_property_id As Byte()
Dim EorW As String
Dim NorS As String
Dim prop_type As String
Dim TheImageUsed As System.Drawing.Bitmap
Dim PropertyIDarray() As Integer
Dim TheProperty As Integer
Dim counter As Integer
Dim degrees As Double
Dim minutes As Double
Dim seconds As Double
Dim Altitude As Double
Dim LAT As String
Dim LON As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim TheString As String
TheString = readProps("c:\tmp\IMG_0090_____test.jpg")
MsgBox(TheString)
End Sub
Public Function readProps(ByVal TheJPG As String) As String
Dim TheString As String
TheImageUsed = New System.Drawing.Bitmap(TheJPG)
PropertyIDarray = TheImageUsed.PropertyIdList
For Each Me.TheProperty In PropertyIDarray
counter = counter + 1
byte_property_id = TheImageUsed.GetPropertyItem(TheProperty).Value
prop_type = TheImageUsed.GetPropertyItem(TheProperty).Type
If TheProperty = 1 Then
'Latitude North or South
NorS = System.Text.Encoding.ASCII.GetString(byte_property_id)
ElseIf TheProperty = 2 Then
'Latitude degrees minutes and seconds (rational)
degrees = System.BitConverter.ToInt32(byte_property_id, 0) / System.BitConverter.ToInt32(byte_property_id, 4)
minutes = System.BitConverter.ToInt32(byte_property_id, 8) / System.BitConverter.ToInt32(byte_property_id, 12)
seconds = minutes - Int(minutes)
minutes = Int(minutes)
seconds = 60 * seconds
LAT = CStr(degrees) & "d " & CStr(minutes) & ":" & CStr(Int(seconds))
ElseIf TheProperty = 3 Then
'Longitude East or West
EorW = System.Text.Encoding.ASCII.GetString(byte_property_id)
ElseIf TheProperty = 4 Then
'Longitude degrees minutes and seconds (rational)
degrees = System.BitConverter.ToInt32(byte_property_id, 0) / System.BitConverter.ToInt32(byte_property_id, 4)
minutes = System.BitConverter.ToInt32(byte_property_id, 8) / System.BitConverter.ToInt32(byte_property_id, 12)
seconds = minutes - Int(minutes)
minutes = Int(minutes)
seconds = 60 * seconds
LON = CStr(degrees) & "d " & CStr(minutes) & ":" & CStr(Int(seconds))
ElseIf TheProperty = 6 Then
Altitude = System.BitConverter.ToInt32(byte_property_id, 0)
End If
Next TheProperty
TheString = (LAT + " " + NorS + " " + LON + " " + EorW + " " + CStr(Altitude))
Return TheString
End Function]
Jozi68
9-Feb-11 3:06am
View
Did you assume that I expect someone to write the entire application for me?
Did you perhaps vote based on that assumption?
Jozi68
9-Feb-11 3:04am
View
I downloaded Visual C# 2010 and ran your project. I can see that a lot of work went into it; and it works beautifully. Unfortunately my vb.net skills are limited, and my c# skills are non-existent. I spent a lot of time trying to figure out how it works, but without success.
Thank you very much anyway, I appreciate you're willingness to help.
Jozi68
9-Feb-11 0:49am
View
Deleted
I downloaded Visual C# 2010 Express. However, when I try to run your project, I get this message:
"A project with an Output Type of Class Library cannot be started directly.
In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project."
Do you know what the problem is?
Jozi68
8-Feb-11 10:04am
View
Thanx Nishant for your reply, I can unfortunately not open your project file, perhaps because I am using VS2005?
Show More