Git Product home page Git Product logo

cthing / meazure Goto Github PK

View Code? Open in Web Editor NEW
83.0 5.0 11.0 56.08 MB

Screen magnification, measurement, capture and color sampling for Windows.

Home Page: https://www.cthing.com

License: GNU General Public License v2.0

CMake 3.68% HTML 10.98% CSS 2.06% C 3.03% C++ 78.99% JavaScript 1.12% Python 0.14%
measurement screen-capture windows rulers colorpicker color-picker crosshairs angle protractor

meazure's People

Contributors

baron1405 avatar ungeahnt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

meazure's Issues

Create an XML writer to centralize handling of escaping and pretty printing

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:

  • Escaping XML content as appropriate
  • Normalizing CR+LF to LF
  • Encoding the output in UTF-8
  • Pretty printing the XML

Reorganize the code into subfolders and improve class naming

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.

Provide a button to copy the current color to the clipboard

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.

Title and description text fields are not shown on the position save dialog

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:

  1. Turn off the Vista style and use a dialog template similar to what we are currently doing. There are still issues requiring manual DDX to read values on Save and manual positioning of the template items.
  2. Use the Vista style and work with the CFileDialog methods that provide the ability to add controls to the dialog

Multiple custom units

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.

YIQ display clips negative values

Currently, Meazure clips negative values when displaying the YIQ color space. That is incorrect and the negative values should be displayed.

Is it possible to change the shortcut keys?

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.

Provide web color matching color views

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.

Use more conventional CMYK color conversion equations

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)

Modernize CMake usage

The CMakeLists.txt throughout the source tree are showing their age. Update them by considering the following new features and best practices:

  • Specify 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.
  • Consider using PUBLIC, PRIVATE, or INTERFACE with any target_link_libraries
  • Remove the predicates from end* statements in all conditions, loops, function and macro definitions
  • Remove any project commands in subdirectories
  • Break out functional areas (e.g. doxygen) into separate .cmake files and include them
  • Migrate from using CMAKE_* variable to using target properties (exception is C++ standard)
  • Specify all C++ standard variables: CMAKE_CXX_STANDARD 17, CMAKE_CXX_STANDARD_REQUIRED ON, CMAKE_CXX_EXTENSIONS OFF
  • List Meazure.cfg as SOURCES for custom target
  • Use cmake_path() to extract pathname components instead of file() or get_filename_components
  • Consider adding project description and homepage URL metadata to project
  • Use imported targets from found packages instead of variables
  • Check Boost package for COMPONENTS
  • Properly configure Visual Studio project generation

Improve dialog font

The font used for the dialogs was originally specified as "MS Sans Serif" and it now looks rather ugly for dialog text:

MeazureAboutDlg

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.

Windows 7 compatibility

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.

2024-0314-1521 meazure4 windows7 error

Fortunately, Meazure 3.0.2 still works fine and fast.

Scale measurements

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.

  • get the pixel distance
  • set the "real world" distance for that
  • every subsequent measurement would display both the pixel distance and the "real world" calculated distance.

Also, any chance of "approving" this for Win10?

Thanks.

Ability to show supplemental angle

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.

transparent windows - zoom display

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.

Add fast measurement rectangle

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.

add using the keyboard to fine tune the position

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.

Position log DTD uses incorrect type for GUID and GUIDRef entities

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.

Modernize the codebase

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:

  • Use { } for initialization to prevent unexpected type conversion
  • Replace #define and class constants (i.e. kFoo) with constexpr
  • Use range for where applicable to avoid an unnecessary index variable
  • Replace NULL or 0 for pointer initialization with nullptr
  • Consider using function default parameters instead of simple method overloading
  • Consider using member unpacking where appropriate
  • Use noexcept on methods where appropriate
  • Ensure all single argument constructors are marked explicit
  • Consider using move semantics for returned objects
  • Use typename for templates

Not correct when scaling screen

I have set Windows to scale text, apps, and other items to 125%, and then Meazure doesn't display the correct information from the location of the pointer. Assume that Meazure does not pick up the scaling - and is therefore not very useful to me. Is it possible to fix this?

screenshot

HSL color display uses an unconventional range

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

Linux port?

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

Multiple tools at same time

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!

Zoom does not fit to cursor

There is a problem with fitting the zoom window and the cursor. Both are at different places - see the picture. The more far the cursor is from the zero point the more difference is there.

3193847555-Screenshot_1

Possible problem maker: Scale and Layout settings in Windows 10

2332325702-Screenshot_2

How to change language?

Hello,

I see that there are many language file in the installation fold, such as mfc140cht.dll. How do I change the language to cht? Thanks.
explorer_A5wyAFRHf1

Is it possible to set an offset to the screen grid?

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

Use Conan for dependency management

Currently, Meazure developers must Boost and other dependencies on their development machines. This is never desirable and is no longer necessary using Conan to manage dependencies. Integrate Conan into the Meazure CMake build.

This issue depends on #28.

Fix precompiled header handling and naming

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

Key bindings/Hotkeys

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.

Multiple angle measurement

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

Ability to make grid spacing less than 40

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

Replace expat with Xerces-C++

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.

Easier definition of custom units

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]":

units

Calculate and display aspect ratio

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.

V3.0: 'Load positions' throws error 'positionLog is not recognized'

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

grafik

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"/>

Alternative point symbol

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.