cthing / meazure Goto Github PK
View Code? Open in Web Editor NEWScreen magnification, measurement, capture and color sampling for Windows.
Home Page: https://www.cthing.com
License: GNU General Public License v2.0
Screen magnification, measurement, capture and color sampling for Windows.
Home Page: https://www.cthing.com
License: GNU General Public License v2.0
Currently, the position log and profile classes handle the details of writing well formed and pretty printed XML. This should be centralized to an XML writer class. This class will handle:
The src/meazure
directory currently contains all Meazure application source code. The number of source files has grown to a point where it has become clumsy to navigate during development. It is time to use subfolders to organize the source files. Another clumsiness is the original project wizard naming for the application main, frame and view classes. Rename those for clarity.
Currently, users need to highlight the text field containing the current color and copy it to the clipboard using the shortcut or Edit menu item. Given that this is a primary use case of the color field, a button should be provided that copies the color field contents to the clipboard.
It should not be possible to paste into a data field that is readonly.
The position save dialog is supposed to show two additional text fields at the bottom of the dialog. One field allows a title to be specified for the position log. The other field allows a description for the log. Currently neither is shown. This is due to Microsoft changing to the Vista style for the file save dialog. This style does not support dialog templates and silently ignores them.
There are two possible approaches to fixing this:
Nice program! It is already proving very useful.
It would be helpful to be able to add numerous different custom units to the units menu, rather than just one. I am measuring digital photomicrographs that might be taken with any of four magnifications, and might be displayed at any of several window sizes, so it would be handy to be able to set up custom units for each, and then pick them from the units menu as needed.
If you were to implement this, it would also help to have more characters to name these units (maybe up to 30, for names like "microns 400x 1280x1024 preview").
I hope that is a useful suggestion.
Currently, Meazure clips negative values when displaying the YIQ color space. That is incorrect and the negative values should be displayed.
I need a lot of angle measurements, Positioning the crosshair at the mouse position by pressing Ctrl+Shift+(1,2,3) is a great feature. But my fingers are short and it's too hard to press keys, LOL, Is it possible to change the shortcut key to Ctrl+shift+(z, x, c). One more suggestion is whether the angle value can be increased (180 - angle = angle value). Thank you very much for the software you developed, it helped me a lot.
In V2, using one of the keyboard shortcuts STR+C, STR+X or STR+V in 'Positions/Description text window' resulted in a corrupted mpl file.
These shortcuts seem to be disabled in V3.
What is the probability that these keyboard shortcuts will be fixed in the foreseeable future?
Provide color views that match the current color to the basic or extended web colors. Views should be provided to show the color name and corresponding hex color spec. When one of these color views is selected, the color swatch should show the matched color rather than the actual color.
Suggestion: Sometimes I would like to move the entire red outline without changing its shape or size. Maybe holding down a key such as Shift could cause all the crosshairs to move simultaneously.
Meazure is current using an unconventional equation to convert RGB to an approximation of CMYK:
k = min(cyan, magenta, yellow)
c = cyan - k
m = magenta - k
y = yellow - k
A more conventional conversion is:
k = min(cyan, magenta, yellow)
c = (cyan - k) / (1 - k)
m = (magenta - k) / (1 - k)
y = (yellow - k) / (1 - k)
The CMakeLists.txt throughout the source tree are showing their age. Update them by considering the following new features and best practices:
VERSION
in the project
command. If becomes the source of truth for the entire project can can be used to generate the VersionNumbers.h
file.PUBLIC
, PRIVATE
, or INTERFACE
with any target_link_libraries
end*
statements in all conditions, loops, function and macro definitionsproject
commands in subdirectories.cmake
files and include themCMAKE_*
variable to using target properties (exception is C++ standard)CMAKE_CXX_STANDARD 17
, CMAKE_CXX_STANDARD_REQUIRED ON
, CMAKE_CXX_EXTENSIONS OFF
Meazure.cfg
as SOURCES for custom targetcmake_path()
to extract pathname components instead of file()
or get_filename_components
The font used for the dialogs was originally specified as "MS Sans Serif" and it now looks rather ugly for dialog text:
Investigate using either the system font (i.e. the default for dialogs, "MS Shell Dlg") or other more attractive font. Also check the font used for the data display and floating data window.
Dear @cthing, is there any feature in Meazure 4.0 that requires an OS newer than Windows 7 x64? If it's just a matter of compiler flags, then add compatibility, please.
Fortunately, Meazure 3.0.2 still works fine and fast.
Namespaces are now the recommended way to do static utility classes.
Use cmake-lint from the cmakelang project to check the CMakeLists.txt. Provide a top level target for running the linter and document the necessary installation steps in the Building.md document.
One thing that I often wish I had was an easy way to measure things by scale. It should be a reasonable do-able addition to meazure and would give it a unique feature that other screen measuring tools I've found don't have.
IOW, I have a picture or map where I know the distance of one thing in cm/m/km/in/ft/mi, and I want to know the distance of something else in the picture.
Also, any chance of "approving" this for Win10?
Thanks.
Requested by @linhaiqd:
One more suggestion is whether the angle value can be increased (180 - angle = angle value). Thank you very much for the software you developed, it helped me a lot.
On Win 11 x64 Meazure reports a screen resolution of 2560 x 1440, but in fact I have a 4K monitor (3840 x 2160).
Is it possible to rotate origin ?
Windows 7 64bit - Meazure 2.0.1
Seems like if I have a transparent window, with visible graphics on the window, only a specific color is transparentized, then Meazure doesn't seem to see all the screen items. It sees the stuff underneath the specific transparentized window but not the stuff infront.
Just want to say thank you for making this! It's amazing.
Just one thing, in Photoshop there's a function where you can click and drag to create a temporary square for fast measurements. Could you add something like that? The Rectangle tool in Meazure is nice but it's slow to use.
hi, this is the best measure tool i have found. i am using it allot! good work!
one thing i REALLY miss is the ability to fine tune the position of the points using the keyboard. i mean, using keyboard arrows to nudge the pointers around, one press = one pixel.
Migrating the from homegrown DTD validator to the Xerces validator, uncovered a bug in the position log DTD. The GUID and GUIDRef entities are given the type ID and IDREF respectively. Xerces detected that this is invalid in the case where the GUID starts with a decimal digit because the ID type must start with a letter. The correct type for the GUID and GUIDRef attributes is NMTOKEN, which can start with a digit.
Since changing from ID to NMTOKEN is relaxing the type constraint, the smoothest what to introduce this fix is to simply change the type but keep the same DTD version number and filename. The fixed DTD will be bundled with the next release of Meazure and will be published to the C Thing Sofware website at that time as well.
Meazure is written in C++ circa the late 1990's. C++ has evolved quite a bit since that time with a number of exciting features. Consider updating the codebase to C++17 for possible use of the following language features:
{ }
for initialization to prevent unexpected type conversion#define
and class constants (i.e. kFoo
) with constexpr
for
where applicable to avoid an unnecessary index variableNULL
or 0
for pointer initialization with nullptr
noexcept
on methods where appropriateexplicit
typename
for templatesWhen displaying a color in the HSL color space, Meazure uses a range of 0-240 for all components. This is potentially confusing. Typically, HSL components are displayed as hue between 0 and 360 degrees, and saturation and lightness as a percentage between 0 and 100. Switch Meazure's display of HSL to use the conventional units.
During my Windows time, I used this regularly as the best screen measurement tool!!!
Are there any plans to make it usable on Linux?
I tried to run it in Wine
. It starts, the main window is shown, the magnifying glass works, but the crosshairs (and sometimes the area between them) are simple solid blocks...
I'm probably not using meazure for it's intended purpose, but it's perfectly customizable, I love it. I'm using the overlaying lines as an aid for a game, but I really need several lines and it seems I can only draw and see one at a time. I've read through the help material and can't find where to make and see multiple tools at a time, please let me know if I've overlooked something and keep up the great work!
right now, I move the program around to align with the grid for checking alignments. But then I need the program to be in specific location for screen recording so I have to move back to the exact location after check alignments.
If I can offset the screen grid, that would be much more convenient.
TIA
Meazure does not appear to be making use of precompiled headers for MFC. To improve compile performance, precompiled headers should be used (target_precompile_headers
).
When the Meazure codebase was originally created, the precompiled header for MFC was called stdafx.h
with a corresponding stdafx.cpp
. Microsoft now names these files pch.h
and pch.cpp
respectively when generating new projects. Migrate the codebase to use these new file names and clean up the includes to use the proper case for the file names (i.e. currently stdafx.h
is include as StdAfx.h
which is a code smell).
The link to this GitHub repository on the BitBucket readme:
https://bitbucket.org/cthing/meazure/src/master/
includes the ending period:
https://github.com/baron1405/meazure.
This causes GitHub to show:
404
This is not the
web page you
are looking for.
Pixel color is currently displayed as RGB values, separated with a spece.
Is it possible to add a parameter to have other displays?
In my case I would be interested by having this in hexadecimal, without space. Eg. #8aba82.
Thank you !
Someone please add a key binding option for the lines and angles tools. So that on pressing a key say "q" we can set the points of the line segment. "W" to set other 2nd point. E to set 3rd point. When a shortcut key is pressed wherever the mouse pointer is, a point is place.
Is there a way to specify the height, width, and location of the grid. I'd like to make a smaller grid, one that is not full screen.
current : 3 adjustable points to make and measure an angle
improvement : add extra point(s) to measure more angle(s )
Example : one additional point makes you measure the 2nd angle in a " Z " shaped object
It's good to support greater values than 1000px as well as smaller values than 40px for grid spacing.
When using a large display or resolution it comes handy! 4K or 8K and even more.
Hi,
Would it be possible to change the application to support grid lines of less than 40. We have a software development tool that does not support gridlines for screen development and your tool will be perfect if we had the ability to make the squares smaller
Congrats on an awesome tool
Thanks
Andrew
Currently, Meazure embeds a copy of the expat XML parser and a separate XML validator. This was pretty much the state of the art for XML in the late 1990's when Meazure was first written. There are now validating XML parser libraries available in C++. Replace the existing embedded XML parser and validator with Xerces-C++. Use Conan to manage the dependency.
This issue depends on #26.
Increase the unit test coverage by breaking out non-GUI operations from GUI classes.
The software is already very helpful for me (many thanks for sharing it) but I'd like to suggest an improvement. Currently, to define a custom unit one has to specify the number of pixels equal to 1 mm or other unit of choice. It would be way faster if there was an option to specify the number of pixels and the corresponding number of millimeters or other units and let the software do the division. So something like "x pixels equals x [unit]" in addition to "x pixels equals 1 [unit]":
One of my most common uses for Meazure is to figure out the aspect ratio of video clips. I'm not referring to the pixel dimensions of the video stream, but the actual non-black part of the video displayed. I use Meazure's Rectangle tool to find the dimensions, but then have to use a calculator to figure out the aspect ratio.
Please consider adding aspect ratio to the displayed values for Line, Rectangle, and Window tools.
I've been assuming all along that it would be impractical for Meazure's zoom panel to actually show video streams because they are displayed using video overlay mode. If it is not, it would be most helpful when measuring video dimensions to actually see something in that zoom panel.
Thanks a lot for the new version!
But I get the following error when I try to load a position (.mpl) saved with V2.0.1. The position-file works fine with V2.0.1.
btw: with V3 it's not possible for me to create/save positions (the menu is grayed out). My mistake: I forgot that first you have to create the profile via menu 'Edit - Record position'.
Here the first lines from the mpl:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE positionLog SYSTEM "http://www.cthing.com/dtd/PositionLog1.dtd">
<positionLog version="1">
<info>
<title>Meazure Position Log File</title>
<created date="2022-04-07T07:52:53Z"/>
<generator name="Meazure" version="2.0.1" build="5"/>
Yes, I have another request...
A nice feature would be an option to pick a different way of marking the points between which the measurements are taken. The current four triangles are good for many applications, but I would also like to use a simple perpendicular line. That is, the endpoint of a line being measured would be indicated by the measured line extending all the way (or close to) the endpoint, with a short perpendicular line on either side resulting in an "H" shape (in the case of a horizontal linear measurement). The perpendiculars could stop short of the endpoint, so that it remained visible, or the display could be solid, covering up the endpoint, or both options could be available. Some color alternatives, as are currently available for the 4 triangles, might help make this display more visible in different situations.
The advantage of this form of display is that the symbol on the screen is the same size as the desired measurement, while the current 4-triangle symbol extends beyond the line being measured. I am measuring one object, then looking at additional ones in different images and using the line display from the previous measurement as a visual scale for quick, rough comparisons. The 4-triangle display is a little less direct as a visual comparison, since the triangles extend beyond the measured points.
Thank you for writing Meazure and making it freely available. It is a great tool.
It's great to have a feature that user can change size of line width (in pixels), globally or per/feature.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.