"Image not compressed warning that has me flummoxed

22 views
Skip to first unread message

Dave Francis

unread,
Jul 29, 2020, 5:41:03 PM7/29/20
to superca...@googlegroups.com
Sometimes (more often than not it seems) when I close a script in RTE I get a message about an image not being compressed. I've no idea what it relates to and it's driving me batty. 

I do have a line of script in one of my projects that I think you gave me a few years ago Mark. It uses the OS's algorithm to reduce the size of an image for me. But that's in only one of my projects, which isn't even open when this warning comes up.

I'm not even sure if the warning is generated by SC or if it's the OS getting smart. Could it be some obscure conflict between SC v4.8.1 and my OS X 10.9.5? (Hey, I'd rather be using OS9 but one must keep up mustn't one) 😜

I'd appreciate any suggestion folks. TIA, Dave

codegreen

unread,
Jul 29, 2020, 7:52:25 PM7/29/20
to SuperCard Discussion
That looks like an answer dialog, and the message displayed in it is a string that's written to the result when pictCompression is enabled and SC tries to save a PICT image that due to its content would actually get bigger if compressed at the specified level.

In other words unless this is some debug build I sent you SC is most likely not displaying this message on its own, and instead there's a line of script somewhere in your environment that's putting up this dialog (after examining the result and finding that it isn't empty).

Try opening your SharedFile's project script (Control-S) and pasting this in at the end:

on answer theMsg

   if theMsg starts with "Image not compressed" then trace

   else pass answer

end answer


That should open the Tracer whenever this happens, and then you can use the Levels… button to reveal where the offending line of script is.

-Mark

Dave Francis

unread,
Jul 29, 2020, 8:55:13 PM7/29/20
to superca...@googlegroups.com
Thanks Mark, what would we do without you?! I followed your advice; the Levels... button didn't take me anywhere but the line the tracer stuck on is self evident as far as it goes:

Apparently the pEventID returns rapp instead of odoc, which is totally beyond me, so I'm none the wiser.



Cheers, Dave

codegreen

unread,
Jul 29, 2020, 9:38:04 PM7/29/20
to SuperCard Discussion
OK it looks like we overshot the point of interest.

Instead when you first drop into the Tracer try clicking once on the Step button, which should take you back to the handler where the offending answer command is. 

If it isn't obvious what to do at that point, just post the handler and we'll take it from there.

-Mark

Dave Francis

unread,
Jul 30, 2020, 12:55:47 AM7/30/20
to superca...@googlegroups.com
Well Mark, If I had any hair I sure haven't any left now. Since putting your little script back into the shared file, I've been bombarded with tracer responses. Any msg at all seems to triggers the tracer into action. I've told it to trace off a few dozen times but it just won't take the hint. 

So I haven't had any more of those mysterious 'Image not compressed' warnings.. mainly because I haven't been able to get on with doing anything! 

So I took your script out of the shared file - and immediately got the bloody warning again; which I couldn't follow up because the tracer was off. duh..... I think I'll go and make a coffee.

--
You received this message because you are subscribed to the Google Groups "SuperCard Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supercard-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/supercard-talk/ed35fff3-8f42-4f2e-829a-731f16ad26b1o%40googlegroups.com.

codegreen

unread,
Jul 30, 2020, 1:59:16 AM7/30/20
to SuperCard Discussion
Once you enter trace mode you need to click Go or Exit (or else just quit SC) to stop breaking on every message.

-Mark

Dave Francis

unread,
Jul 30, 2020, 3:32:47 AM7/30/20
to superca...@googlegroups.com
Are you saying trace off no longer works?

I've had a look for pict compression in the help files but found nothing relevant. If it refers to shrinking an image on screen (as opposed to reducing the size of a file), I don't need any reductions as I've tailored all my image files to fit into their respective draw graphic rectangles, and anyway the draw graphics' locked properties are set to false.

The tracer seems to have settled down now, but I'm not getting the compression warnings. I've no doubt they'll be back to frustrate me tomorrow.  😊

Cheers, Dave.

On 30 Jul 2020, at 3:29 pm, 'codegreen' via SuperCard Discussion <superca...@googlegroups.com> wrote:

Once you enter trace mode you need to click Go or Exit (or else just quit SC) to stop breaking on every message.

-Mark


--
You received this message because you are subscribed to the Google Groups "SuperCard Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supercard-tal...@googlegroups.com.

codegreen

unread,
Jul 30, 2020, 11:46:56 AM7/30/20
to SuperCard Discussion

I've had a look for pict compression in the help files but found nothing relevant. If it refers to shrinking an image on screen (as opposed to reducing the size of a file), I don't need any reductions as I've tailored all my image files to fit into their respective draw graphic rectangles, and anyway the draw graphics' locked properties are set to false.

I guess that's something else Scott for whatever reason decided to leave out. FWIW:

A new global property called the pictureCompression (aka pictCompression) allows automatic JPEG compression of pictureData at a range of speeds and qualities (so you can choose the one that best fits your particular purpose). It may be set to any of the following values:
none
minimum
low
normal (aka medium)
high
maximum
lossless (the default)

•  A read-only per-graphic pictCompression property reports what compression (if any) was used on its stored image

  Using SC's ‘raw’ import/export options automatically overrides whatever default compression is specified 

The result is now set to advise the user whenever a specified compression level is ignored, which happens if compression would make the image bigger (i.e., take up more bytes), or if it’s already compressed with the same or lower quality

-Mark

Dave Francis

unread,
Jul 30, 2020, 4:25:12 PM7/30/20
to superca...@googlegroups.com
The result is now set to advise the user whenever a specified compression level is ignored

Thanks Mark, that certainly sounds like a possible reason for getting the warning that I'm getting - except for the fact that my images are cropped to fit. And it doesn't explain why the the tracer keeps opening randomly, completely ignoring the "if theMsg starts with.." condition. It even popped up just now when I hit control-S !

Is there any way in which I can simply suppress those annoying compression warnings?

Cheers, Dave.

--
You received this message because you are subscribed to the Google Groups "SuperCard Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supercard-tal...@googlegroups.com.

Dave Francis

unread,
Jul 30, 2020, 4:36:51 PM7/30/20
to superca...@googlegroups.com
Here's a peculiar happening which is probably apropos of nothing at all, and is quite harmless, but may be of interest: 

If I have a SC project open and I've been messing with my "poor man's photoshop", i.e. Acorn, when I close Acorn and the SC project becomes active again, I find that my background graphic's content, or at least the top left corner of it, has been placed in the msg box!

It doesn't hamper messages in any way as it seems to be just a residue which is easily typed over. Peculiar, or what?  😊

Dave Francis

unread,
Jul 30, 2020, 4:45:00 PM7/30/20
to superca...@googlegroups.com
Did I mention that the "Image not compressed" warning only appears when I close a script window? It may (or may not) be relevant. 😊

--
You received this message because you are subscribed to the Google Groups "SuperCard Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supercard-tal...@googlegroups.com.

codegreen

unread,
Jul 30, 2020, 7:01:35 PM7/30/20
to SuperCard Discussion

Thanks Mark, that certainly sounds like a possible reason for getting the warning that I'm getting - except for the fact that my images are cropped to fit.

Compression doesn't have anything to do with whether your image fits in the parent object's bounds - it just controls whether (and how much) JPEG compression is applied to the image's pixel data it's saved in the project file.


And it doesn't explain why the the tracer keeps opening randomly, completely ignoring the "if theMsg starts with.." condition. It even popped up just now when I hit control-S !

By definition if this is happening then you're tracing (which doesn't just happen by itself). Are you saying that when the Tracer pops up and you click Go tracing continues anyway?


Is there any way in which I can simply suppress those annoying compression warnings?

That's what we're trying to do! 

You've apparently shown that the theory about this being an answer dialog is correct, so now we're just trying figure out where this unwanted call is being made.

It's not clear to me how the handler I posted could produce the effect you're describing (and it certainly doesn't here) but please try this instead:

on answer theMsg

   if not (theMsg starts with "Image") then 

      trace off

      pass answer

   end if

   put "Bingo! Now click Return to go back to the script where the bad call is being made"

   trace

end answer


After you change the script, quit and re-launch SC. If the behavior you're describing persists this handler definitely isn't what's causing it, and you probably stuck a trace in somewhere else by accident (I'd check the SharedFile's appleEvent handler first).

If you prefer you can use Project Search to scan your project(s) and the RTE/SharedFile for uses of the result, but you'll likely encounter a bunch of them and have to identify the one that's causing your problem by reading each reported usage.

-Mark

Dave Francis

unread,
Jul 30, 2020, 8:40:04 PM7/30/20
to superca...@googlegroups.com
Right, I don't suppose this is relevant but just in case; none of the images I use are in jpeg format, they're all .png files. So I guess you're saying that SC converts them to jpeg to store them in the project.

I'm sorry I don't express myself very well. When the tracer window is open and I click Exit or Go the window does indeed close. But typing 'tracer off' into the msg box has no effect; the tracer still gets triggered randomly. 

For example I have a button called 'temp 2' which simply displays a list of the userProps in a given field. I've no doubt you could write it more elegantly but it's only temporary. I've used it dozens of times so it must be bullet proof. Yet now and then the tracer will pounce on it as if something's wrong. Stepping through it doesn't find any snags. 
When I asked about suppressing the warnings, I didn't mean to imply you're not helping. I know you're doing all you can (pulling teeth!) to get enough info to solve the problem. What I meant was, is there a (dirty, illegal) way, maybe a scrap of script or something, to force SC to ignore the compression problems it's having under the hood and thereby stop those warnings from popping up?

Cheers, Dave.

--
You received this message because you are subscribed to the Google Groups "SuperCard Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supercard-tal...@googlegroups.com.

Dave Francis

unread,
Jul 30, 2020, 9:04:13 PM7/30/20
to superca...@googlegroups.com
I've now tried the new script you gave me and hit the Bingo thingo almost immediately. The problem appears to be in the returnKey script, but I can make nothing of it.
I've had a look at the shared file's appleEvent handler and notice one version ha been commented out (I didn't do it, honest!). 

I tried using the project search on the shared file, and found several mentions of 'the result' but couldn't work out what they were referring to. 

Must admit, I'm not focusing as much as I should just now as I'm late for a doctor's appointment. Will catch up a bit later.

Cheers, Dave,

On 31 Jul 2020, at 8:31 am, 'codegreen' via SuperCard Discussion <superca...@googlegroups.com> wrote:

It's not clear to me how the handler I posted could produce the effect you're describing (and it certainly doesn't here) but please try this instead:

on answer theMsg

   if not (theMsg starts with "Image") then 

      trace off

      pass answer

   end if

   put "Bingo! Now click Return to go back to the script where the bad call is being made"

   trace

end answer


After you change the script, quit and re-launch SC. If the behavior you're describing persists this handler definitely isn't what's causing it, and you probably stuck a trace in somewhere else by accident (I'd check the SharedFile's appleEvent handler first).

If you prefer you can use Project Search to scan your project(s) and the RTE/SharedFile for uses ofthe result, but you'll likely encounter a bunch of them and have to identify the one that's causing your problem by reading each reported usage.

-Mark


codegreen

unread,
Jul 30, 2020, 9:42:24 PM7/30/20
to SuperCard Discussion
On Thursday, July 30, 2020 at 8:40:04 PM UTC-4, Dave Francis wrote:
Right, I don't suppose this is relevant but just in case; none of the images I use are in jpeg format, they're all .png files. So I guess you're saying that SC converts them to jpeg to store them in the project.

Actually images are converted to PICT for storage, but PICT has an option to JPEG-encode bitmap content (which depending on the image may save a LOT of space).

 
I'm sorry I don't express myself very well. When the tracer window is open and I click Exit or Go the window does indeed close. But typing 'tracer off' into the msg box has no effect; the tracer still gets triggered randomly. 

Right, that's what shows that there's still a stray trace command somewhere (otherwise you wouldn't keep dropping back into the Tracer again). BTW you do understand that script will drop you into the Tracer INSTEAD of displaying the offending dialog, right?


For example I have a button called 'temp 2' which simply displays a list of the userProps in a given field. I've no doubt you could write it more elegantly but it's only temporary. I've used it dozens of times so it must be bullet proof. Yet now and then the tracer will pounce on it as if something's wrong. Stepping through it doesn't find any snags. 

As before, this happens because you're already tracing. 


When I asked about suppressing the warnings, I didn't mean to imply you're not helping. I know you're doing all you can (pulling teeth!) to get enough info to solve the problem. What I meant was, is there a (dirty, illegal) way, maybe a scrap of script or something, to force SC to ignore the compression problems it's having under the hood and thereby stop those warnings from popping up?

If you just want to paper over the problem, this should do that:

on answer theMsg

   if not (theMsg starts with "Image not compressed") then pass answer

end answer


-Mark

Dave Francis

unread,
Jul 31, 2020, 12:43:26 AM7/31/20
to superca...@googlegroups.com
Thanks again for your patience Mark, but the fact remains Project Search can't find any mention of trace in the project I'm working on, nor the project I've been working off of, nor the Shared File (other than the script you suggested I add for testing).

Yes I do understand that when the tracer is active it's supposed to indicate troublesome scripts, but it doesn't seem to be doing that. It opens on scripts that look fine, and in fact have worked perfectly numerous times before.

Thanks for the bandaid solution. I guess I'm going to have to go with that, as the problem has been holding me up and I really want to get on with developing this new project, if it's even possible.

Cheers, Dave.
--
You received this message because you are subscribed to the Google Groups "SuperCard Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supercard-tal...@googlegroups.com.

codegreen

unread,
Jul 31, 2020, 12:59:37 AM7/31/20
to SuperCard Discussion

Thanks again for your patience Mark, but the fact remains Project Search can't find any mention of trace in the project I'm working on, nor the project I've been working off of, nor the Shared File (other than the script you suggested I add for testing).

 If so (and this latest version changes the behavior) then the first trace you've been hitting must be the one in that answer handler (which was what we were aiming for, right?). 

Thanks for the bandaid solution. I guess I'm going to have to go with that, as the problem has been holding me up and I really want to get on with developing this new project, if it's even possible.

So let it be written...

-Mark 
Reply all
Reply to author
Forward
0 new messages