ImageTools REALBasic Author?

I am updating some code that I wrote ~ 12 years ago. It includes a Module called ImageTools that contains many methods. Some examples: getBicubic, rotate99cw, Hmirror, horizontalBlinds.

I left a note to myself that “I got it off the Internet”. The author put short comments at the start of the individual method code. For example, the note at the top of Hmirror is

// Horizontal mirror.
// see also vertical mirror
// Quite fast for pure RB code… If I may say so myself :wink:

I would prefer to know just who contributed this code rather than just “I got it off the Internet”. I thought it might be Joe Strout because I have used his graphic code to do other things in this project, but I am unable to confirm this. Are there any old folks on this forum who know who the author was? Who “myself” is?

This is all I could find:
https://nug.xojo.narkive.com/pAP6nqBS/drawing-a-greyscale-picture#post4
https://web.archive.org/web/20070814143732/http://sungnyemun.org/?q=node/3

1 Like

I think it’s Didier Barbas. The “dda” from the old Nug.

2 Likes

Thanks you Rick. You are correct. I searched on Didier Barbas and got a hit on issue 2.3 (2003) of REALbasic Developer magazine which I still have and I was able to look up Didier’s article on Unroll the loops where he discusses some of the code that I had in the ImageTools module.

Better yet, in that article, he explains the logic behind some of his code decisions. He introduced complexity to achieve greater speed. I had found it puzzling in reading the uncommented code that I had to work on to bring up to date for Xojo 2021. I did not understand why he had not done things more simply.

I have almost every old issue of REALbasic Developer magazine but am missing issue 3.1 where apparently Didier wrote an article with the below objectives. I am certain that it is this Library that I have.

We will produce a basic graphics library that’ll extend the Picture object, making the library more portable and the code using it more readable

1 Like

Indeed this was me. I had been, until the 2000s, very active, then personal and health issues prevented me from doing much, hobby-wise for a decade or so. Now that I am semi-retired (ie I do however much, or little work I feel like, when I like :slight_smile:), I am using RB, I mean Xojo… again, mostly for personal projects.

I am indeed happy that someone has found use for my code, and went to lengths to find the author. Thank you!

Didier

3 Likes

is there any link where this imagetool project could still be downloaded ?
the webarchive link above does not allow it…
thanks.

Hi. I should probably clean it up, make sure it still works, and add a sample project that works with a modern version of Xojo. I’ll work on that this weekend and post a link.

9 Likes

Welcome back Didier!

8 Likes

Thanks Jason!

1 Like

Hello everyone, a very belated update… I have finally cleaned up the library and posted it on my Github repository. Feel free to play with it and critique :slight_smile:

6 Likes

As best I can understand it, the actual code in the various methods of the module is entirely unchanged except for sometimes the comments at the top of some of the methods. Is this the case?

The demo project has seen a few changes.

I don’t think I understand the demo project: ImageTools.xojoproject. I downloaded it. When I run it, I end up with a blank canvas. I can paste an image into this canvas and at that point the menu items under the Tools menu become available, but I get an error when using any of them.

So I am confused as to how to play with the demo project. Is there supposed to be a default image in the canvas that the user is supposed to play with?

Hi Robert. This is indeed a new demo, not the old demo – it wasn’t properly in Xojo, and I don’t have the time right now to troubleshoot it.

So this demo shows a blank canvas indeed, where you drop an image file, or paste one from the clipboard.



Of course “It’s working on my computer” is not very useful, but… it does! :slight_smile:

What kind of errors pop up?

@Robert_Livingston the only way to get this to work is to copy and paste. Drag & Drop will not work as the demo is currently implemented.

@Didier_Barbas I tried the Greyscale function but it tries to operate on a read only image and raises an exception.

@Didier_Barbas The code might be cleaner if the deprecated RGB was replaced by the modern Color.RGB. RGB (rgb) is used extensively in the code and will fill up the – Deprecated items that have a replacement – with lots of entries in the Warnings & Errors area.

I get this same exception with both Greyscale function and Invert function.

With Reset function I get another error:

Greyscale works here:

Drag’n’drop also works

DnD

I just ran into that Reset exception – I fixed this. I will upload a fix shortly. Thanks for this.

InvertGreyscale

Invert and Greyscale are working fine…

My system and Greyscale
Mac/Sonoma/Xojo 2023 V3

My experience

@Robert_Livingston - you wouldn’t happen to be passing something that’s considered an Image in Xojo would you? Things with multiple resolutions don’t have an rgbsurface to work with so the pixel method won’t work.

1 Like

Since I don’t know what you mean by “considered an image in Xojo” I get a sinking feeling that I must be doing something wrong. :thinking:

In my tests I have tried passing in a jpg and a tiff and a png version of an image. I have been copying and pasting since I have not been successful dragging in an image.

In my experience, I have found that if I FIRST Rotate Right and/or Rotate Left and THEN do Greyscale, it works without a problem. If the FIRST thing I do is Greyscale, then I run into the problem (error).