Oddly enough I experienced no pain whatsoever, so do not apologise: between us we are having an odd type of bromance
where one of us has access to Windows and the other Macintosh, almost as bizarre as a conversation about sex where one
of us is gay and the other one is straight.
I am, almost, tempted to run down the road and get an acquaintance of mine
to install an OEM version of Windows 10 on the oldest, cheap, heap-of-junk
that can cope with it just so our 'bromance' can flourish, or, at the very
least communication re these issues becomes a whole lot easier.
which will run MacOS 10.7.5, LC 8.1.10, and let you do all your interface "shenanigans without
"having to climb into bed with Richmond" . . . less risk of infection (with my lunacy) . . .
richmond62 wrote: Fri Oct 08, 2021 7:15 pm
we are having an odd type of bromance
It's nice to have a little bromance in my life...especially when I would like MacOS users as well as Windows users to have a good experience with Serendipity Editors.
Here is the latest revision. I deleted all the logic around Mac Title 3 & Mac Title 4, and corrected an error I created in my "fix" to keep image New Image Frame from reacting to LiveCode paint tools.
marksmithhfx wrote: Wed Oct 13, 2021 5:45 pm
what kinds of image formats does Serendipity work with?
Morning Mark,
The Image Editor essentially works on images in LiveCode paint mode. LiveCode converts GIFs, PNGs, JPEGs to paint (PMB, etc.) images upon import and converts them back (or to another image format) on export. Also, composite images can be created from screen snapshots encompassing multiple smaller images in one or more image formats.
The Icon Editor presents a pixel grid of up to 32x32 pixels, and pixel-by-pixel changes in the grid are displayed in the actual output icon as a paint image which can be exported in the same four formats.
There is a bug in the LiveCode IDE (#233720) that causes screen snapshots exported to GIF format to render incorrect images on Win32, and the current version of the Editors does not support animated GIFs.
Cheers!
Rob Cozens dba Serendipity Software Company
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
A minor enhancement: To continuously increment height or width of a new image or icon in response to mouseStillDown, replace the scripts of the Height/Width Adjustor images in Image Editor's Image Dimension group and the Icon Editor's Resize Grid group with...
global mouse3State
local clickOffset
on mouseDown -- 8 Oct 21:RCC
put mouse(3) into mouse3State
put (item 2 of the mouseLoc)-(item 2 of the loc of me) into clickOffset
end mouseDown
on incrementField -- 8 Oct 21:RCC
if clickOffset = 0 then exit incrementField
if mouse3State is "down" then put 100 into theIncrement else put 1 into theIncrement
put the text of field "Image Height" into currentHeight
if clickOffset < 0 then add theIncrement to currentHeight else subtract theIncrement from currentHeight
if currentHeight < 1 then exit incrementField
set the text of field "Image Height" to currentHeight
end incrementField
on mouseStillDown buttonNumber -- 8 Oct 21:RCC
incrementField
put "up" into mouse3State -- Increment by 1 after the first 100 if right button is down
end mouseStillDown
on mouseUp -- 8 Oct 21:RCC
incrementField
put "up" into mouse3State
end mouseUp
global mouse3State
local clickOffset
on mouseDown -- 11 Oct 21:RCC
put mouse(3) into mouse3State
put (item 1 of the mouseLoc)-(item 1 of the loc of me) into clickOffset
end mouseDown
on incrementField -- 11 Oct 21:RCC
if clickOffset = 0 then exit incrementField
if mouse3State is "down" then put 100 into theIncrement else put 1 into theIncrement
put the text of field "Image Width" into currentWidth
if clickOffset > 0 then add theIncrement to currentWidth else subtract theIncrement from currentWidth
if currentWidth < 1 then exit incrementField
set the text of field "Image Width" to currentWidth
end incrementField
on mouseStillDown buttonNumber -- 11 Oct 21:RCC
incrementField
put "up" into mouse3State -- Increment by 1 after the first 100 if right button is down
end mouseStillDown
on mouseUp -- 11 Oct 21:RCC
incrementField
put "up" into mouse3State
end mouseUp
local clickOffset
on mouseDown -- 11 Oct 21:RCC
put (item 2 of the mouseLoc)-(item 2 of the loc of me) into clickOffset
end mouseDown
on incrementField -- 11 Oct 21:RCC
constant gridRowSize = 32 -- Change this if you wish to build a larger grid
if clickOffset = 0 then exit incrementField
lock screen
put the loc of image "Icon Image" into savedLocation
get the text of field "Icon Dimensions"
put word 3 of it into currentHeight
if clickOffset < 0 then add 1 to currentHeight else subtract 1 from currentHeight
if currentHeight < 1 or currentHeight > gridRowSize then exit incrementField
put currentHeight into word 3 of it
set the text of field "Icon Dimensions" to it
set the height of image "Icon Image" to currentHeight
set the loc of image "Icon Image" to savedLocation
unlock screen
end incrementField
on mouseStillDown buttonNumber -- 11 Oct 21:RCC
incrementField
end mouseStillDown
on mouseUp -- 11 Oct 21:RCC
incrementField
end mouseUp
local clickOffset
on mouseDown -- 11 Oct 21:RCC
put (item 1 of the mouseLoc)-(item 1 of the loc of me) into clickOffset
end mouseDown
on incrementField -- 11 Oct 21:RCC
constant gridRowSize = 32 -- Change this if you build a larger grid
if clickOffset = 0 then exit incrementField
lock screen
put the loc of image "Icon Image" into savedLocation
get the text of field "Icon Dimensions"
put word 1 of it into currentWidth
if clickOffset > 0 then add 1 to currentWidth else subtract 1 from currentWidth
if currentWidth < 1 or currentWidth > gridRowSize then exit incrementField
put currentWidth into word 1 of it
set the text of field "Icon Dimensions" to it
set the height of image "Icon Image" to currentWidth
set the loc of image "Icon Image" to savedLocation
unlock screen
end incrementField
on mouseStillDown buttonNumber -- 11 Oct 21:RCC
incrementField
end mouseStillDown
on mouseUp -- 11 Oct 21:RCC
incrementField
end mouseUp
Rob Cozens dba Serendipity Software Company
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
* Pulldown menus have been replace with palettes
* Size & location of New Image Frame and size of new images & icons can be adjusted without invoking the Properties Inspector
* Image scanning & comparing handlers are rewritten to replace handler calls in the main repeat loops with straight-line code (reduces execution time to scan a 490,000-pixel image from 9864 ticks to 8029 ticks)
* I created my own busy cursor (as a learning experience)
* Images & icons are now correctly exported to all supported image types (except GIF on Windows)
end switch
-- get the result
-- if it is not empty then
-- beep
-- answer "Image export error:" && it
-- end if
if not newImageExport then
For those of you who (like moi) find the new busy cursors provide insufficient feedback when scanning, comparing, or exporting large images, the revision I'm working on now displays a progress bar.
Cheers!
Rob Cozens dba Serendipity Software Company
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Here's Rev 2.1 and a discussion of a performance issue.
I never intended for Serendipity Editors to be compiled. My concept was another developers' tool, not an app.
In testing today, when uncompiled it takes 1188 ticks to set the dgText representation of a 497,200-pixel image and 952 ticks to clear it
The compiled version set it in 523 ticks and cleared it in 53.
So I am looking into whether one can include LiveCode paint tools in a compiled app?
Without the paint tools the Image Editor can mask images and create screen snapshots of grouped images; but individual images cannot be created or modified.
Fortunately, the Icon Editor does not use the paint tools; so its functionality is not diminished.
The only functions where this problem is experienced are scanning and comparing images. That functionality was originally built as a tool for me to understand LiveCode's imageData format and debug the stack, as imageData is not readable in the Script Editor when debugging.
I expect the scan and compare functions will be the least used; so, at least for users who want to actually edit images with LiveCode's paint tool, I suggest you run Serendipity Editors as a stack rather than compile it.
Rev 2.21 now checks all monitors when importing an oversize image. The user is prompted to move the stack to the largest monitor before shrinking the image if it is not already displayed there.
And it is finally possible to manipulate the size and position of the New Image Frame without invoking the Property Inspector.
Also, a bug that arose when exporting a screen snapshot from a rectangle that included areas outside existing images has been corrected.
This week I had a need to mask a specific color in an existing image; so I have added that capability in Serendipity Editors Rev 2.3.
To use this feature when exporting an image, right-click on the "Export" button of the Image Selector Palette. This will prompt you to click on the image color you want to be made transparent.
I forgot to reinitialize the new user prompt before compressing Rev 2.3.
First time users should:
1. Open the stack
2. Type 'set the hilite of button "Opening Prompt Display" of group "Opening Prompt Group" to false' in the Message Box
3. Press Enter
4. Save the stack
5. Close the stack & remove it from memory
6. Reopen the stack
Cheers!
Rob Cozens dba Serendipity Software Company
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
I took the liberty of changing "Fot" in this thread's title to "For". If that was incorrect I can set it back. But it's a nice thread with many fine contributions, seemed fitting to tidy up its title to match the quality of the engagement here.
Richard Gaskin LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn