Black boxes replace images in Mojave (Was "No subject")

Phil Davis revdev at pdslabs.net
Tue Jun 4 23:22:11 EDT 2019


As it turns out, the Remove script uses the sips command.

    (*
    Remove
    ©2009 Apple, Inc.

    Use sips to remove embedded profile and color management data from
    an image.
    *)

    on run
         display dialog "Remove the embedded profile from an image."
         set chosenFile to choose file with prompt "Choose an image "
    default location path to desktop folder
         open chosenFile
    end run


    on open draggedItems
         repeat with thisFile in (draggedItems as list)
             try
                 -- use 'sips -d profile' to remove an embedded profile
                 -- or use 'sips -d profile
    --deleteColorManagementProperties' to remove an embedded profile and
    other color related info
                 set filePath to quoted form of POSIX path of thisFile
                 set cmdLine to ("sips -d profile
    --deleteColorManagementProperties " & filePath) as string
                 do shell script cmdLine
             end try
         end repeat
    end open


Phil Davis



On 6/4/19 2:14 PM, Matthias Rebbe via use-livecode wrote:
> Tom,
>
> see answer below
>
>
>
>> Am 04.06.2019 um 23:02 schrieb tbodine via use-livecode <use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>:
>>
>> Mark and Matthias,
>>
>> This workaround looks promising!
>>
>> While I don't have Mojave to test against, I do find problem images have
>> many different colorSync profiles.
>>
>> Matthias, after you have stripped out the profile, what does Preview's Info
>> screen show as the ColorSync Profile data?
>>
> Both methods,
>
> Marks one.... terminal command:   sips -d profile --deleteColorManagementProperties ~/Downloads/Background_mit_Rand_.png
>
> and my... dragging the image onto Remove.app in  /library/scripts/colorsync/
> replaces the ColorSync Profile to sRGB IEC61966-2.1
>
>
> Regards,
>
> Matthiass
>
>
>> I'm thinking it would be good to have an acceptable default value that I can
>> tell users is OK, and anything else should be stripped.
>>
>> Thanks to your both!
>>
>> Tom Bodine
>>
>>
>>
>>
>> --
>> Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html <http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>

-- 
Phil Davis




More information about the Use-livecode mailing list