Author Topic: Reverse engineering tool as requested by Dave Jones  (Read 1276 times)

0 Members and 1 Guest are viewing this topic.

Offline hennep

  • Newbie
  • Posts: 4
  • Country: nl
Reverse engineering tool as requested by Dave Jones
« on: August 31, 2021, 12:54:37 pm »
I have created a tool to load 2 separate images and show these with transparency.
See Dave's video: https://youtu.be/GOk1BYKSsOI



The tool is developed with Code::Blocks and wxWidgets in Linux.
I don't have a working Code::Blocks installation on Windows.
If somebody can offer some help to compile this on Windows, it will be appreciated.

The project:
https://github.com/HenniePeters/RevEngE

cheers,
Hennie
« Last Edit: August 31, 2021, 01:00:33 pm by hennep »
 
The following users thanked this post: msliva, DiTBho

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 3226
  • Country: fi
    • My home page and email address
Re: Reverse engineering tool as requested by Dave Jones
« Reply #1 on: September 01, 2021, 08:34:38 am »
You know, you could do the same directly in the browser, with a bit of HTML5 and JavaScript.

Such pages do not require a network connection.  For example, my FIR filter example –– just type some coefficients, say 1 0 1 in the top text box, and press Enter, and it'll show the FIR filter frequency response for that filter –– you can save as a HTML page on your own computer, and it'll work exactly like it would when loaded from a server.  (That example is in Public Domain, so if you wanted to play with how to do such pages using HTML, JavaScript, and the Canvas element as defined in HTML5, feel free!)

The reason I personally like such "tool pages" is that they work on basically all devices as-is, including tablets, which are useful for browsing datasheets and such while using other tools to do some work.  If I recall correctly, you may need a network connection and a helpful server to implement drag-and-drop of images.  I'd use text boxes with direct URLs to the images, using file:// urls for files on the local machine, since that should always work.  The only real difficulty is making them responsive: because JavaScript isn't that fast, you may need to use timers and callbacks to do display updates, instead of directly in the event handlers.  If you use the event handlers directly, on slower machines (like tablets!) the UI may be jerky, unresponsive while "computing" the next state.  So, there is some art in this too, even though it is just HTML + CSS + JavaScript.
 
The following users thanked this post: Galenbo

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2052
  • Country: nl
Re: Reverse engineering tool as requested by Dave Jones
« Reply #2 on: September 01, 2021, 10:51:29 am »
The tool is developed with Code::Blocks and wxWidgets in Linux.
I don't have a working Code::Blocks installation on Windows.
If somebody can offer some help to compile this on Windows, it will be appreciated.

If you do have a working development environment on linux, you could do a cross-compile for windows. Code::Blocks is a cross-platform IDE after all, it even says so on the wiki. And since the codeblocks.org webserver keeps crapping out with a 502, here's a wayback snapshot of the cross-compile instructions:

https://web.archive.org/web/20200429154954/https://wiki.codeblocks.org/index.php/Cross_Compiling_wxWidgets_Applications_on_Linux
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2052
  • Country: nl
Re: Reverse engineering tool as requested by Dave Jones
« Reply #3 on: September 01, 2021, 11:08:49 am »
You know, you could do the same directly in the browser, with a bit of HTML5 and JavaScript.
That sounds suspiciously much like ... work.  :o

Better living through laziness and ImageMagick:

apt-get install imagemagick && man imagemagick composite

Quote
Such pages do not require a network connection.  For example, my FIR filter example –– just type some coefficients, say 1 0 1 in the top text box, and press Enter, and it'll show the FIR filter frequency response for that filter –– you can save as a HTML page on your own computer, and it'll work exactly like it would when loaded from a server.  (That example is in Public Domain, so if you wanted to play with how to do such pages using HTML, JavaScript, and the Canvas element as defined in HTML5, feel free!)
Hey, neat!  :-+ Just had a bit fun plugging in some sequences. Response seems pretty snappy.

Quote
The reason I personally like such "tool pages" is that they work on basically all devices as-is, including tablets, which are useful for browsing datasheets and such while using other tools to do some work.  If I recall correctly, you may need a network connection and a helpful server to implement drag-and-drop of images.  I'd use text boxes with direct URLs to the images, using file:// urls for files on the local machine, since that should always work.  The only real difficulty is making them responsive: because JavaScript isn't that fast, you may need to use timers and callbacks to do display updates, instead of directly in the event handlers.  If you use the event handlers directly, on slower machines (like tablets!) the UI may be jerky, unresponsive while "computing" the next state.  So, there is some art in this too, even though it is just HTML + CSS + JavaScript.
In principle I 100% agree with you here. Unfortunately whenever I try this myself, I always break out in a horrible rash. JavaScript allergy.  :'(
 

Offline hennep

  • Newbie
  • Posts: 4
  • Country: nl
Re: Reverse engineering tool as requested by Dave Jones
« Reply #4 on: September 01, 2021, 09:58:04 pm »
Thanks for pointing to the cross compiling option in code:blocks. I missed that completely.

I made a demonstration video for the tool.
 

Offline hennep

  • Newbie
  • Posts: 4
  • Country: nl
Re: Reverse engineering tool as requested by Dave Jones
« Reply #5 on: December 24, 2021, 12:58:02 pm »
I've created a windows version for the tool with Borland C++Builder.
A windows binary is available on github including source files.
https://github.com/HenniePeters/RevEngE
 
The following users thanked this post: dunkemhigh

Offline DrG

  • Super Contributor
  • ***
  • !
  • Posts: 1203
  • Country: us
Re: Reverse engineering tool as requested by Dave Jones
« Reply #6 on: December 24, 2021, 05:44:08 pm »
I looked at the vid - nice!

So, I for the few times that I have wanted to, I do it manually using PS (and an old version that you could buy, not rent). Not going to harangue you about...make it do this...and make it do that, but I did this one today and I noticed (again) that PS offers all sorts of options that can come in handy (i.e., you might want to consider adding - or not). For example, to emphasize the traces on the reverse I changed color on them and the effect is noticeable.







Again, nice job on what you have done and shared!

« Last Edit: December 24, 2021, 05:46:53 pm by DrG »
- Invest in science - it pays big dividends. -
 

Offline hennep

  • Newbie
  • Posts: 4
  • Country: nl
Re: Reverse engineering tool as requested by Dave Jones
« Reply #7 on: December 27, 2021, 11:16:23 am »
emphasize the traces on the reverse I changed color on them and the effect is noticeable.
How did you emphasize the traces?  By changing contrast?
If that is a simple algoritm I could try to add it to the program. I don't know how yet, but...
 

Offline DrG

  • Super Contributor
  • ***
  • !
  • Posts: 1203
  • Country: us
Re: Reverse engineering tool as requested by Dave Jones
« Reply #8 on: December 27, 2021, 04:04:24 pm »
emphasize the traces on the reverse I changed color on them and the effect is noticeable.
How did you emphasize the traces?  By changing contrast?
If that is a simple algoritm I could try to add it to the program. I don't know how yet, but...

No, by substitution of a picked color. This may not be so easy to do programmatically, especially with me explaining, although if you have experience with PS, you can figure out how to do it. Also, it is not the trace but rather the outline of the trace.

Operating on the reverse layer, in this case, I use the eye dropper to pick a color and then replace that color, with red in the example below (I used black in my original post). You can select only an area of the layer and also futz with the fuzzy slider to avoid unwanted common colors.



Then, when you decrease opacity on the layer, the color is emphasized across the flip and blend.



As I said, this may not be too easy to do programmatically and with me explaining :)
« Last Edit: December 27, 2021, 04:06:59 pm by DrG »
- Invest in science - it pays big dividends. -
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf