Copy link to clipboard
Copied
Hi there, I recently started embedding images in my scripts...
Today for some reason, AFX doesn't like loading any scripts with embedded graphics...
"Unable to load temporary image file" is the message I am getting.
and the script crashes... restarted, AFX, ESTK and pc ... same deal.
Any idea what is causing the conflict....?
Thanks
Alan.
Copy link to clipboard
Copied
Hard to say really, what version AE and OS are you running? My first guess is that maybe the source image's file permissions or it's parent folder permissions may have changed somehow causing an error. Place a try/catch around all your image retrieval code and see if you can get more clearer info about the issue.
try{
//your code
}catch(err){
alert("Error at line " + err.line.toString() + "/n" + err.toString());
}
Copy link to clipboard
Copied
Hi David - using a try/catch reports the same...
"Unable to load temporary image file"
I am using a binary string to represent the image....
//=======================================================
var imageSettings="\u0089PNG\r\n\x1A\n\x00\x00\x00 etc
var b7= pnl.add("iconbutton",undefined,imageSettings);
//=======================================================
So it's not permissions as I'm not actually using the file...
It was working yesterday.. and now it's not - maybe my ESTK is the problem...
Copy link to clipboard
Copied
Quite possibly it is ESTK. I know results will differ sometimes in it versus AE, which is why I always test my code directly in AE via a dummy placeholder script that I can save to repeatedly, but still be able to launch it from the script menu without relaunching AE each time.
I would also verify that the image binary isn't missing a character or got wrapped to a new line and broke the string by chance.
Copy link to clipboard
Copied
Thanks David, Not the ESTK. I have tested just using in AFX too.
Related thread -
http://forums.adobe.com/message/4972646
Don't know! Just checking my computer for any weird updates that might have changed something.
As I said it's been working fine for months and today decided not to work....
All old functioning scripts are now not loading due to embedded images.
So weird.
The strings are fine, as they have not been altered...
Thanks for the reply.
Copy link to clipboard
Copied
I can try doing a test at work when I get in. What version AE is the issue happening in for you?
Copy link to clipboard
Copied
Hi, David - pasted test code below...
(The string is on one line in the ESTK, unbroken)
So will load when tested in ESTK.
Will cause that error in my After Effects, or crash the ESTK or just not work if run as a dummy script in After Effects
Win 7 x64 / AFX 5.5
Might try re install the ESTK as it has been acting very strange...~!!
Thanks lot. TTUT.
//=======================================================
var image="\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\"\x00\x00\x00$\b\x06\x00\x00\x00\u00EC\x1E\u00E8\u00DF\x00\x00\x00\tpHYs\x00\x00\x0B\x13\x00\x00\x0B\x13\x01\x00\u009A\u009C\x18\x00\x00\nOiCCPPhotoshop ICC profile\x00\x00x\u00DA\u009DSgTS\u00E9\x16=\u00F7\u00DE\u00F4BK\u0088\u0080\u0094KoR\x15\b RB\u008B\u0080\x14\u0091&*!\t\x10J\u0088!\u00A1\u00D9\x15Q\u00C1\x11EE\x04\x1B\u00C8\u00A0\u0088\x03\u008E\u008E\u0080\u008C\x15Q,\f\u008A\n\u00D8\x07\u00E4!\u00A2\u008E\u0083\u00A3\u0088\u008A\u00CA\u00FB\u00E1{\u00A3k\u00D6\u00BC\u00F7\u00E6\u00CD\u00FE\u00B5\u00D7>\u00E7\u00AC\u00F3\u009D\u00B3\u00CF\x07\u00C0\b\f\u0096H3Q5\u0080\f\u00A9B\x1E\x11\u00E0\u0083\u00C7\u00C4\u00C6\u00E1\u00E4.@\u0081\n$p\x00\x10\b\u00B3d!s\u00FD#\x01\x00\u00F8~<<+\"\u00C0\x07\u00BE\x00\x01x\u00D3\x0B\b\x00\u00C0M\u009B\u00C00\x1C\u0087\u00FF\x0F\u00EAB\u0099\\\x01\u0080\u0084\x01\u00C0t\u00918K\b\u0080\x14\x00@z\u008EB\u00A6\x00@F\x01\u0080\u009D\u0098&S\x00\u00A0\x04\x00`\u00CBcb\u00E3\x00P-\x00`'\x7F\u00E6\u00D3\x00\u0080\u009D\u00F8\u0099{\x01\x00[\u0094!\x15\x01\u00A0\u0091\x00 \x13e\u0088D\x00h;\x00\u00AC\u00CFV\u008AE\x00X0\x00\x14fK\u00C49\x00\u00D8-\x000IWfH\x00\u00B0\u00B7\x00\u00C0\u00CE\x10\x0B\u00B2\x00\b\f\x000Q\u0088\u0085)\x00\x04{\x00`\u00C8##x\x00\u0084\u0099\x00\x14F\u00F2W<\u00F1+\u00AE\x10\u00E7*\x00\x00x\u0099\u00B2<\u00B9$9E\u0081[\b-q\x07WW.\x1E(\u00CEI\x17+\x146a\x02a\u009A@.\u00C2y\u0099\x192\u00814\x0F\u00E0\u00F3\u00CC\x00\x00\u00A0\u0091\x15\x11\u00E0\u0083\u00F3\u00FDx\u00CE\x0E\u00AE\u00CE\u00CE6\u008E\u00B6\x0E_-\u00EA\u00BF\x06\u00FF\"bb\u00E3\u00FE\u00E5\u00CF\u00ABp@\x00\x00\u00E1t~\u00D1\u00FE,/\u00B3\x1A\u0080;\x06\u0080m\u00FE\u00A2%\u00EE\x04h^\x0B\u00A0u\u00F7\u008Bf\u00B2\x0F@\u00B5\x00\u00A0\u00E9\u00DAW\u00F3p\u00F8~<<E\u00A1\u0090\u00B9\u00D9\u00D9\u00E5\u00E4\u00E4\u00D8J\u00C4B[a\u00CAW}\u00FEg\u00C2_\u00C0W\u00FDl\u00F9~<\u00FC\u00F7\u00F5\u00E0\u00BE\u00E2$\u00812]\u0081G\x04\u00F8\u00E0\u00C2\u00CC\u00F4L\u00A5\x1C\u00CF\u0092\t\u0084b\u00DC\u00E6\u008FG\u00FC\u00B7\x0B\u00FF\u00FC\x1D\u00D3\"\u00C4Ib\u00B9X*\x14\u00E3Q\x12q\u008ED\u009A\u008C\u00F32\u00A5\"\u0089B\u0092)\u00C5%\u00D2\u00FFd\u00E2\u00DF,\u00FB\x03>\u00DF5\x00\u00B0j>\x01{\u0091-\u00A8]c\x03\u00F6K'\x10Xt\u00C0\u00E2\u00F7\x00\x00\u00F2\u00BBo\u00C1\u00D4(\b\x03\u0080h\u0083\u00E1\u00CFw\u00FF\u00EF?\u00FDG\u00A0%\x00\u0080fI\u0092q\x00\x00^D$.T\u00CA\u00B3?\u00C7\b\x00\x00D\u00A0\u0081*\u00B0A\x1B\u00F4\u00C1\x18,\u00C0\x06\x1C\u00C1\x05\u00DC\u00C1\x0B\u00FC`6\u0084B$\u00C4\u00C2B\x10B\nd\u0080\x1Cr`)\u00AC\u0082B(\u0086\u00CD\u00B0\x1D*`/\u00D4@\x1D4\u00C0Qh\u0086\u0093p\x0E.\u00C2U\u00B8\x0E=p\x0F\u00FAa\b\u009E\u00C1(\u00BC\u0081\t\x04A\u00C8\b\x13a!\u00DA\u0088\x01b\u008AX#\u008E\b\x17\u0099\u0085\u00F8!\u00C1H\x04\x12\u008B$ \u00C9\u0088\x14Q\"K\u00915H1R\u008AT UH\x1D\u00F2=r\x029\u0087\\F\u00BA\u0091;\u00C8\x002\u0082\u00FC\u0086\u00BCG1\u0094\u0081\u00B2Q=\u00D4\f\u00B5C\u00B9\u00A87\x1A\u0084F\u00A2\x0B\u00D0dt1\u009A\u008F\x16\u00A0\u009B\u00D0r\u00B4\x1A=\u008C6\u00A1\u00E7\u00D0\u00ABh\x0F\u00DA\u008F>C\u00C70\u00C0\u00E8\x18\x073\u00C4l0.\u00C6\u00C3B\u00B18,\t\u0093c\u00CB\u00B1\"\u00AC\f\u00AB\u00C6\x1A\u00B0V\u00AC\x03\u00BB\u0089\u00F5c\u00CF\u00B1w\x04\x12\u0081E\u00C0\t6\x04wB a\x1EAHXLXN\u00D8H\u00A8 \x1C$4\x11\u00DA\t7\t\x03\u0084Q\u00C2'\"\u0093\u00A8K\u00B4&\u00BA\x11\u00F9\u00C4\x18b21\u0087XH,#\u00D6\x12\u008F\x13/\x10{\u0088C\u00C47$\x12\u0089C2'\u00B9\u0090\x02I\u00B1\u00A4T\u00D2\x12\u00D2F\u00D2nR#\u00E9,\u00A9\u009B4H\x1A#\u0093\u00C9\u00DAdk\u00B2\x079\u0094, +\u00C8\u0085\u00E4\u009D\u00E4\u00C3\u00E43\u00E4\x1B\u00E4!\u00F2[\n\u009Db@q\u00A4\u00F8S\u00E2(R\u00CAjJ\x19\u00E5\x10\u00E54\u00E5\x06e\u00982AU\u00A3\u009AR\u00DD\u00A8\u00A1T\x115\u008FZB\u00AD\u00A1\u00B6R\u00AFQ\u0087\u00A8\x134u\u009A9\u00CD\u0083\x16IK\u00A5\u00AD\u00A2\u0095\u00D3\x1Ah\x17h\u00F7i\u00AF\u00E8t\u00BA\x11\u00DD\u0095\x1EN\u0097\u00D0W\u00D2\u00CB\u00E9G\u00E8\u0097\u00E8\x03\u00F4w\f\r\u0086\x15\u0083\u00C7\u0088g(\x19\u009B\x18\x07\x18g\x19w\x18\u00AF\u0098L\u00A6\x19\u00D3\u008B\x19\u00C7T071\u00EB\u0098\u00E7\u0099\x0F\u0099oUX*\u00B6*|\x15\u0091\u00CA\n\u0095J\u0095&\u0095\x1B*/T\u00A9\u00AA\u00A6\u00AA\u00DE\u00AA\x0BU\u00F3U\u00CBT\u008F\u00A9^S}\u00AEFU3S\u00E3\u00A9\t\u00D4\u0096\u00ABU\u00AA\u009DP\u00EBS\x1BSg\u00A9;\u00A8\u0087\u00AAg\u00A8oT?\u00A4~Y\u00FD\u0089\x06Y\u00C3L\u00C3OC\u00A4Q\u00A0\u00B1_\u00E3\u00BC\u00C6 \x0Bc\x19\u00B3x,!k\r\u00AB\u0086u\u00815\u00C4&\u00B1\u00CD\u00D9|v*\u00BB\u0098\u00FD\x1D\u00BB\u008B=\u00AA\u00A9\u00A19C3J3W\u00B3R\u00F3\u0094f?\x07\u00E3\u0098q\u00F8\u009CtN\t\u00E7(\u00A7\u0097\u00F3~\u008A\u00DE\x14\u00EF)\u00E2)\x1B\u00A64L\u00B91e\\k\u00AA\u0096\u0097\u0096X\u00ABH\u00ABQ\u00ABG\u00EB\u00BD6\u00AE\u00ED\u00A7\u009D\u00A6\u00BDE\u00BBY\u00FB\u0081\x0EA\u00C7J'\\'Gg\u008F\u00CE\x05\u009D\u00E7S\u00D9S\u00DD\u00A7\n\u00A7\x16M=:\u00F5\u00AE.\u00AAk\u00A5\x1B\u00A1\u00BBDw\u00BFn\u00A7\u00EE\u0098\u009E\u00BE^\u0080\u009ELo\u00A7\u00DEy\u00BD\u00E7\u00FA\x1C}/\u00FDT\u00FDm\u00FA\u00A7\u00F5G\fX\x06\u00B3\f$\x06\u00DB\f\u00CE\x18<\u00C55qo<\x1D/\u00C7\u00DB\u00F1QC]\u00C3@C\u00A5a\u0095a\u0097\u00E1\u0084\u0091\u00B9\u00D1<\u00A3\u00D5F\u008DF\x0F\u008Ci\u00C6\\\u00E3$\u00E3m\u00C6m\u00C6\u00A3&\x06&!&KM\u00EAM\u00EE\u009ARM\u00B9\u00A6)\u00A6;L;L\u00C7\u00CD\u00CC\u00CD\u00A2\u00CD\u00D6\u00995\u009B=1\u00D72\u00E7\u009B\u00E7\u009B\u00D7\u009B\u00DF\u00B7`ZxZ,\u00B6\u00A8\u00B6\u00B8eI\u00B2\u00E4Z\u00A6Y\u00EE\u00B6\u00BCn\u0085Z9Y\u00A5XUZ]\u00B3F\u00AD\u009D\u00AD%\u00D6\u00BB\u00AD\u00BB\u00A7\x11\u00A7\u00B9N\u0093N\u00AB\u009E\u00D6g\u00C3\u00B0\u00F1\u00B6\u00C9\u00B6\u00A9\u00B7\x19\u00B0\u00E5\u00D8\x06\u00DB\u00AE\u00B6m\u00B6}agb\x17g\u00B7\u00C5\u00AE\u00C3\u00EE\u0093\u00BD\u0093}\u00BA}\u008D\u00FD=\x07\r\u0087\u00D9\x0E\u00AB\x1DZ\x1D~s\u00B4r\x14:V:\u00DE\u009A\u00CE\u009C\u00EE?}\u00C5\u00F4\u0096\u00E9/gX\u00CF\x10\u00CF\u00D83\u00E3\u00B6\x13\u00CB)\u00C4i\u009DS\u009B\u00D3Gg\x17g\u00B9s\u0083\u00F3\u0088\u008B\u0089K\u0082\u00CB.\u0097>.\u009B\x1B\u00C6\u00DD\u00C8\u00BD\u00E4Jt\u00F5q]\u00E1z\u00D2\u00F5\u009D\u009B\u00B3\u009B\u00C2\u00ED\u00A8\u00DB\u00AF\u00EE6\u00EEi\u00EE\u0087\u00DC\u009F\u00CC4\u009F)\u009EY3s\u00D0\u00C3\u00C8C\u00E0Q\u00E5\u00D1?\x0B\u009F\u00950k\u00DF\u00AC~OCO\u0081g\u00B5\u00E7#/c/\u0091W\u00AD\u00D7\u00B0\u00B7\u00A5w\u00AA\u00F7a\u00EF\x17>\u00F6>r\u009F\u00E3>\u00E3<7\u00DE2\u00DEY_\u00CC7\u00C0\u00B7\u00C8\u00B7\u00CBO\u00C3o\u009E_\u0085\u00DFC\x7F#\u00FFd\u00FFz\u00FF\u00D1\x00\u00A7\u0080%\x01g\x03\u0089\u0081A\u0081[\x02\u00FB\u00F8z|!\u00BF\u008E?:\u00DBe\u00F6\u00B2\u00D9\u00EDA\u008C\u00A0\u00B9A\x15A\u008F\u0082\u00AD\u0082\u00E5\u00C1\u00AD!h\u00C8\u00EC\u0090\u00AD!\u00F7\u00E7\u0098\u00CE\u0091\u00CEi\x0E\u0085P~\u00E8\u00D6\u00D0\x07a\u00E6a\u008B\u00C3~\f'\u0085\u0087\u0085W\u0086?\u008Ep\u0088X\x1A\u00D11\u00975w\u00D1\u00DCCs\u00DFD\u00FAD\u0096D\u00DE\u009Bg1O9\u00AF-J5*>\u00AA.j<\u00DA7\u00BA4\u00BA?\u00C6.fY\u00CC\u00D5X\u009DXIlK\x1C9.*\u00AE6nl\u00BE\u00DF\u00FC\u00ED\u00F3\u0087\u00E2\u009D\u00E2\x0B\u00E3{\x17\u0098/\u00C8]py\u00A1\u00CE\u00C2\u00F4\u0085\u00A7\x16\u00A9.\x12,:\u0096@L\u0088N8\u0094\u00F0A\x10*\u00A8\x16\u008C%\u00F2\x13w%\u008E\ny\u00C2\x1D\u00C2g\"/\u00D16\u00D1\u0088\u00D8C\\*\x1EN\u00F2H*Mz\u0092\u00EC\u0091\u00BC5y$\u00C53\u00A5,\u00E5\u00B9\u0084'\u00A9\u0090\u00BCL\rL\u00DD\u009B:\u009E\x16\u009Av m2=:\u00BD1\u0083\u0092\u0091\u0090qB\u00AA!M\u0093\u00B6g\u00EAg\u00E6fv\u00CB\u00ACe\u0085\u00B2\u00FE\u00C5n\u008B\u00B7/\x1E\u0095\x07\u00C9k\u00B3\u0090\u00AC\x05Y-\n\u00B6B\u00A6\u00E8TZ(\u00D7*\x07\u00B2geWf\u00BF\u00CD\u0089\u00CA9\u0096\u00AB\u009E+\u00CD\u00ED\u00CC\u00B3\u00CA\u00DB\u00907\u009C\u00EF\u009F\u00FF\u00ED\x12\u00C2\x12\u00E1\u0092\u00B6\u00A5\u0086KW-\x1DX\u00E6\u00BD\u00ACj9\u00B2<qy\u00DB\n\u00E3\x15\x05+\u0086V\x06\u00AC<\u00B8\u008A\u00B6*m\u00D5O\u00AB\u00EDW\u0097\u00AE~\u00BD&zMk\u0081^\u00C1\u00CA\u0082\u00C1\u00B5\x01k\u00EB\x0BU\n\u00E5\u0085}\u00EB\u00DC\u00D7\u00ED]OX/Y\u00DF\u00B5a\u00FA\u0086\u009D\x1B>\x15\u0089\u008A\u00AE\x14\u00DB\x17\u0097\x15\x7F\u00D8(\u00DCx\u00E5\x1B\u0087o\u00CA\u00BF\u0099\u00DC\u0094\u00B4\u00A9\u00AB\u00C4\u00B9d\u00CFf\u00D2f\u00E9\u00E6\u00DE-\u009E[\x0E\u0096\u00AA\u0097\u00E6\u0097\x0En\r\u00D9\u00DA\u00B4\r\u00DFV\u00B4\u00ED\u00F5\u00F6E\u00DB/\u0097\u00CD(\u00DB\u00BB\u0083\u00B6C\u00B9\u00A3\u00BF<\u00B8\u00BCe\u00A7\u00C9\u00CE\u00CD;?T\u00A4T\u00F4T\u00FAT6\u00EE\u00D2\u00DD\u00B5a\u00D7\u00F8n\u00D1\u00EE\x1B{\u00BC\u00F64\u00EC\u00D5\u00DB[\u00BC\u00F7\u00FD>\u00C9\u00BE\u00DBU\x01UM\u00D5f\u00D5e\u00FBI\u00FB\u00B3\u00F7?\u00AE\u0089\u00AA\u00E9\u00F8\u0096\u00FBm]\u00ADNmq\u00ED\u00C7\x03\u00D2\x03\u00FD\x07#\x0E\u00B6\u00D7\u00B9\u00D4\u00D5\x1D\u00D2=TR\u008F\u00D6+\u00EBG\x0E\u00C7\x1F\u00BE\u00FE\u009D\u00EFw-\r6\rU\u008D\u009C\u00C6\u00E2#pDy\u00E4\u00E9\u00F7\t\u00DF\u00F7\x1E\r:\u00DAv\u008C{\u00AC\u00E1\x07\u00D3\x1Fv\x1Dg\x1D/jB\u009A\u00F2\u009AF\u009BS\u009A\u00FB[b[\u00BAO\u00CC>\u00D1\u00D6\u00EA\u00DEz\u00FCG\u00DB\x1F\x0F\u009C4<YyJ\u00F3T\u00C9i\u00DA\u00E9\u0082\u00D3\u0093g\u00F2\u00CF\u008C\u009D\u0095\u009D}~.\u00F9\u00DC`\u00DB\u00A2\u00B6{\u00E7c\u00CE\u00DFj\x0Fo\u00EF\u00BA\x10t\u00E1\u00D2E\u00FF\u008B\u00E7;\u00BC;\u00CE\\\u00F2\u00B8t\u00F2\u00B2\u00DB\u00E5\x13W\u00B8W\u009A\u00AF:_m\u00EAt\u00EA<\u00FE\u0093\u00D3O\u00C7\u00BB\u009C\u00BB\u009A\u00AE\u00B9\\k\u00B9\u00EEz\u00BD\u00B5{f\u00F7\u00E9\x1B\u009E7\u00CE\u00DD\u00F4\u00BDy\u00F1\x16\u00FF\u00D6\u00D5\u009E9=\u00DD\u00BD\u00F3zo\u00F7\u00C5\u00F7\u00F5\u00DF\x16\u00DD~r'\u00FD\u00CE\u00CB\u00BB\u00D9w'\u00EE\u00AD\u00BCO\u00BC_\u00F4@\u00EDA\u00D9C\u00DD\u0087\u00D5?[\u00FE\u00DC\u00D8\u00EF\u00DC\x7Fj\u00C0w\u00A0\u00F3\u00D1\u00DCG\u00F7\x06\u0085\u0083\u00CF\u00FE\u0091\u00F5\u008F\x0FC\x05\u008F\u0099\u008F\u00CB\u0086\r\u0086\u00EB\u009E8>99\u00E2?r\u00FD\u00E9\u00FC\u00A7C\u00CFd\u00CF&\u009E\x17\u00FE\u00A2\u00FE\u00CB\u00AE\x17\x16/~\u00F8\u00D5\u00EB\u00D7\u00CE\u00D1\u0098\u00D1\u00A1\u0097\u00F2\u0097\u0093\u00BFm|\u00A5\u00FD\u00EA\u00C0\u00EB\x19\u00AF\u00DB\u00C6\u00C2\u00C6\x1E\u00BE\u00C9x31^\u00F4V\u00FB\u00ED\u00C1w\u00DCw\x1D\u00EF\u00A3\u00DF\x0FO\u00E4| \x7F(\u00FFh\u00F9\u00B1\u00F5S\u00D0\u00A7\u00FB\u0093\x19\u0093\u0093\u00FF\x04\x03\u0098\u00F3\u00FCc3-\u00DB\x00\x00\x00 cHRM\x00\x00z%\x00\x00\u0080\u0083\x00\x00\u00F9\u00FF\x00\x00\u0080\u00E9\x00\x00u0\x00\x00\u00EA`\x00\x00:\u0098\x00\x00\x17o\u0092_\u00C5F\x00\x00\x02\u00E4IDATx\u00DA\u00EC\u0098_HSQ\x1C\u00C7\u00BF\u00E7\u00EE\u00DE\u00EDn\u00AE\u00D9\u00DA\u00D4)\u00CE9\u00FC\u00974\t\x1B\u00D2*\x07\x15J\u00F5\u00A0/\u00EDM\u00E8\u00A9\x07\u00A1\x07_|1z\u00D8\u0083\x11\u00C1^z\u0089\u00BDFD\u0084\x15\u0088\u00FD\u0093\x12\x11\x1DI%\u0095\u00A1F3-\u00C5\u00A1\u00EC\u00FAg\u00B5D\u00B7qO\x0F\u00B61\u00D9\x1DYl\u00BB\x0B\u00FA\u00BD\u00DC\u00CB\u00F9\u00DD{\u00CF\u00E7|\x7F\x7F8\u00E7\u0092\u00FE\u00B1\x19\u008A<0\x06yby\x03\u00C2\u00C6o\u00BE~\u00FA \x0B\u0080\u00A5\u00B6!\u00CFCC\b\u00C1\u00FE\u00C2}(P\u00F3\u00F2\u0082\x14h\u00D4hoiFYI\x11\x18\u0086\u0091\x0F\u00E4\u00F4q;\nuZ\u00D4U[\u00C0\u00AB8y@luU\u00B0\u0094\u009B\x00\x00Vs)j\u00ACf\x10Br\x0BRZl\u00C0\u0089\u00A6\u0086]\u00CE\u00A3\u008D6h\u00D4|N`\u0098x\u0082\x1E\u00B3\u00DB\u00A0P(v9\u0095\x1C\x0Bg\u00D3a\u0090\x1C\u00E4\n\x03\x00\u0094R<|:\u0082\u009B\u00B7\x1E@\x14\u00C5\u0084\u00D3?\u00BF\u0088\u00E0\u00DA\x06\x14L\u00F6\x15aS\u00C8~\u00AD>\x1A\u008Da\u00DA\u00FF\x05\u008B\u0081\x15y\u00AA&\u00AE\b\u00C7\u00B1\u00D0i5\u00B9k\u00F1Bh\x13\x00\u00B0\u00B4\x1CLqn\u0084\u00C2XZ\x0E\u0082\x10\x02kE\x19\u00A8H1\u00BF\x18\u00C8(@A\u00C9\u00CE\u00FC\u00EC\u00F2Z\x18\x000\u00B7\x10\u00D8\x15\x1AJ)>/,!\u00B0\"@\u00CD\u00ABp\u00F6\u00A4\x03\u00F5\u00D5\u0095\u00B87\u00F0\x02\u00E3o\u00A7\x10\u008D\u00C62\x02\u00A23\u0087\u00A5s$\u00D9Z\u009A\u009B\u00E08r\bJN\u0089J\u00B3\t\u00C5F=.\u009C?\x07K\u00B9\t\u0083#\u00AF\x10\\]\u00CF^\u00B2\u008A\u00A2\b\u0086a@\bA\u00A3\u00AD6\u00E5\u0085B\u009D\x16\u00ED\u00ADN\u00D4W[\u00D1\u00F7x\b\u00EF\u00A6\u00FC\u00D9I\u00D6\u00BDHN)\u0085N\u00ABA\u00B1A\u009F\u00D2{2\u00A6\u00C8\u0093\u00E1\u00970\x15\x1D\u0080\u0092\u00E3\u00C0\u00F3*\u0084\u00BE\u0085\u00A1Q\u00F3\u00A8\u00AB\u00AA\u0080\u009AW!\u00F4\u00FD\x07|\u00AF'\u00E1{3\u0089\u00C0\u008A\x00P\u009A\x1D\u0090\u00BB\u00FD\u00CF%\x1F\u00BC~\u00F9\x12\"\u0091\b\x1E\r\u00F9\u00F0~z\x16[\u00DB\u0091\u008CV\x0F\u00B9z{dOK:Xa\u0084\x10\u00DAD\u00BC\u00DC\u00B3\u00DEY\u00D3\u00D9\u00C7\x05\u00E1\u00FF.>\u00B7\u00BBx\u00DF\u00B3>\u00C4\u00A2\x11y!8%\u00D8\u00E8\u00F6\x16b\u00B1\u00A8\u00AC T\x14\u00C1\u00A4\u00DB\u00F4t\u00B8\u00DA\u00D0\u00E1jK\u00FBroO\x17\u009C\x0E{\u00CA\u00B8\u00D1\u00A0\u0087\u00D7\u00E3\u0086\u00D1\u00A0O\u008C9\x1Dvx=nx=n\u00F4\u00F6t\u00A5\u0096.\u00C3H\u00E7H\u0087\u00ABMr\u0092?\u0099<\x19\u00E2\u00CC\u00A9ftv\u00BB\u00D1\u00D9\u00ED\u00C6\u00E0\u00F0\u0098$\u008Cd\u00F9\u00DE\u00B9? \u00DF\u0091s\u00AF\u0096\x1C\u00B2\u00F8u\u00C6?\u0097P,Y\u00BD+\u00D7nd\x07$\u00F9\u00C3\u00BD=]\x18\x1C\x1E\u00C3\u00E8\u00F8\x04\x00\u00A0\u00B3\u00DB\u009D\bS\x1CBX]\x07j\u00FE\u00D5\u00BF\x01\u00E9\x12\u00D5\u00E9\u00B0ct|\u00E2\u00AF\u00F3&\u00AE\u0098\u00D7\u00B3\u00A3\u0098\u00B0\u00BA.\x192\u00D2\u00EA\u00BAH\u00E5\u00EE#,\u00CB\u0081\u00E5T|N\x0EP\u00BF\u00EB\u00AC?\x07\x00\u00BDx\u00ED&\u00D0\x0Eiw\x00\x00\x00\x00IEND\u00AEB`\u0082";
var win = new Window ("dialog","");
win.alignChildren = "fill";win.spacing=5;
win.add("iconbutton",undefined, image);
win.center(); win.show();
Copy link to clipboard
Copied
Very strange, my CS5.5 ESTK will launch this code with a blank image button, and then after I escape from the dialog window, ESTK hangs. Very wierd.
In AE CS5.5 on OS X 10.8.2 I get an error saying "Error: Invalid image data";
Something tells me that there may be something wrong in the long image string somehow, maybe try re-encoding it.
I tried a variant of your code by simply replacing the image variable with a direct file path to a png icon and it seems to work just fine here:
var image = "~/Desktop/AlertCautionIcon.png";
var win = new Window ("dialog","");
win.alignChildren = "fill";
win.spacing=5;
win.add("iconbutton",undefined, image);
win.center();
win.show();
Here's the icon image I used: http://www.sydefxink.com/AlertCautionIcon.png
Copy link to clipboard
Copied
Hi David, first many thanks for testing it - didn't think the problem would be recreated.
I will do a bit of research on the binary string and see what I can turn up.
To reiterate - this has been working fine for about 6 months, including scripts with UI that I use everyday at work. Then suddenly something changed! However if it is causing a crash on your ESTK - then there is something suspicious about the binary string.
Thanks a lot for your help.
ps. I know the file works fine, it just is a bit tidier to integrate the graphics into the file.
Copy link to clipboard
Copied
Hi,
Were you able to find a solution for this? I am trying to embed some images and I'm getting the exact same issue.
Copy link to clipboard
Copied
Hi,
I think you can create a temp image, and write the image data into the temp image, then you can just load the temp image.
Here's an example
var win = new Window ("dialog", "Icon Button Example");
win.alignment = ["fill","fill"];
var grp1 = win.add ("group");
//store the data in a variable.
var tempImage = "\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\u00EE\x00\x00\x003\b\x02\x00\x00\x00\x1F,\u00A3\u0084\x00\x00\x00\x01sRGB\x00\u00AE\u00CE\x1C\u00E9\x00\x00\x00\x04gAMA\x00\x00\u00B1\u008F\x0B\u00FCa\x05\x00\x00\x00\tpHYs\x00\x00\x0E\u00C3\x00\x00\x0E\u00C3\x01\u00C7o\u00A8d\x00\x00\x02%IDATx^\u00ED\u009B\u00DBn\u0083@\f\x05\u00F9\u00FF\u009FN\u0093\u0097JI \u0082\u00B5=\u00B0fx\u00AB\u00C4\u00FA2g\u0082z\u00A1\u00CB\u00C3K\x02-\b,-\u00B6p\t\t<TY\t\u009A\x10P\u00E5&A\u00BA\u0086*\u00EB@\x13\x02\u00AA\u00DC$H\u00D7Pe\x1DhB@\u0095\u009B\x04\u00E9\x1A\u00AA\u00AC\x03M\b\u00A8r\u0093 ]C\u0095i\x07\u0096\u00F7\u008Bn\u00DF\u00B7\u009F*\u00A3\u00D9~x\u00BC\u00F5%:S\u0097f\u00AA\u008C&\u00B9S\u00E5\u00D5\u00DB\u00D0A'l\u00A6\u00CAhh\x11\u0095\u00F5\u00FBwT\u00AA<\u00B7\u00CA\u00FA\u00FD\u009F\u009F*\u009F\u00A9\u00F2\u00B3w\u00FAs\u00FA\u00B6\u00DF\x7F\u00A3*c\u00B1\u00CD\u00D2h\u00EBc\u0084\u00CD\u008F~\u008E\u008B\u009Bq*c\u00F1L\u00D4\u00E8P\u00B8\u00D8^\u0087\u00A6\u00BA\u00CE\u00CD\u00AA\u008C\x19\u00B2\u00D2(\u00EE\x016}|\u00D4\u00EA\n\u00AA\u008C\u00C9P\u00A2\u00F2\u00AA\x1F\u00D8J\u00D5v\x1E\u00AA\u00AF\u00CAX\u00EE\u009F\u008D\x0E\u00E5\x14\u00BC\u0099\\28\u00EA\u00F0\u00F1\u00D3T\x1E\u009E\u00D8\u0083Y\x040\u00BF\u00B3\x06\u00BE\u00CA\u00EF\u0095}\u00F7\u0080I4\u00D8e^\u00BF}*\x07\u00A3\u00BF\u00C5\u00F1:\u00BF\x13\u00F1\u00A9r\"\u00CC{\u0095\u00CA\u00F2;\u008B\u009A*g\u0091\u00BCc\u009D\x14\u009B\u00B3\u00C0\u00A9r\x16\u00C9\u00E6uR\u00AC\u00FD.\u0092HM\u0095\x13a6)Udm\u00A9\u00C7O\u00F4\u00AA\u00DC\u00C4\u00BF\u00B15&\u00B5v\u00FD\x0FCc\b\x06Na\u00D4fi4\u00C00r\x04\u00C3\x12\x192r\u00F6\u00B4\u00A72F\u00F6\u00CA\u008D\"\u00C9\u00FD8\u008B\u00AD\\4\u00FFXYU\u00C6r/y\x07\x03\u009B~L/\u00F2\u0094*c2DU\u00C6\x06%\u00FDK\u00EC\u00C5\u00A9\u00FC\u00FA\x19\u00D3\u00EB\u009D\u00C0V\u0090\x18\u00A7D\u0093N/\u0085\u00AA|\u00FA\u00B6\u00A7\x0F\u00F0\u00FD\"\u008A\u00D6f\u0085\u00A2\u00CAY$w\u00D5a\u00C4\u00DD5J\u00BB\u009BT\x19\u008D4]et\u00FAk7Se4\u009F\u0088\u00CA\u00E8\u00A0\x136Se4\u00B4\u009D*\u00A33ui\u00A6\u00CAt\u0092\u00FE\x0BB\x11qU.\x02kY\u009A\u0080*\u00D3\u00C4\u00EDWD@\u0095\u008B\u00C0Z\u0096&\u00A0\u00CA4q\u00FB\x15\x11P\u00E5\"\u00B0\u0096\u00A5\t\u00A82M\u00DC~E\x04T\u00B9\b\u00ACei\x02\u00AAL\x13\u00B7_\x11\x01U.\x02kY\u009A\u0080*\u00D3\u00C4\u00EDWD@\u0095\u008B\u00C0Z\u0096&\u00F0\x07\u0088TW@\u00CC4\x14\u0090\x00\x00\x00\x00IEND\u00AEB`\u0082";
//create a temporary image file before displaying it.
myFile = new File(File($.fileName).path + "/tempImage.png");
myFile.encoding = "BINARY";
myFile.open( "w" );
myFile.write( tempImage );
myFile.close();
//displaying it.
grp1.add("iconbutton", undefined, myFile);
//no longer need the file, remove it.
myFile.remove();
win.show ();
Let me know if it help
Copy link to clipboard
Copied
Hi there, thanks for that but the code isn't the issue - it's something else that we havn't been able to solve -
could be Adobe updates /windows updates/ some kind of conflict etc.
I have posted on the InDesign forum too - nothing has come back yet.
Have seen a couple of posts on PS too where people are experiencing this.
I don't exactly know how to define it as a bug, if it is only happening to certain people.
I'm on CS5.5 Win x64 (7)
It was working fine - might have to do a system resore or something.... or just forget about embedding images.
Copy link to clipboard
Copied
Running into this problem too. Any solutions yet?
Copy link to clipboard
Copied
Not a sniff, have been supplying icons in a folder. I spent a long time scouring the web for a solution but nothing turned up...
Copy link to clipboard
Copied
I got in touch with Alvarez,
Suggested that I try saving the image binary stored in the script to disk, then load it. I haven't seen the error since, so maybe it's a workaround?
Here's my implementation:
function loadImage(binary, imageName, scriptName) {
var appSupportPath = Folder.userData.fsName + "/Adobe/ScriptData/" + scriptName;
//check for support folder, create if it doesnt exist
if(!Folder(appSupportPath).exists) {
Folder(appSupportPath).create();
if(!Folder(appSupportPath).exists) {
alert("Could not create folder: " + appSupportPath + ".");
return;
}
}
var imageFileName = appSupportPath + "/" + imageName + ".png";
var imageFile = new File(imageFileName);
//check for file, create if it doesnt exist
if(!imageFile.exists) {
imageFile.encoding = "BINARY";
imageFile.open("w");
imageFile.write( binary );
imageFile.close();
if(!imageFile.exists) {
alert("Could not create file in: " + appSupportPath + ".");
return;
}
}
return imageFile;
}
Only tested in CS6.
Copy link to clipboard
Copied
Cool, don't have time at the moment to look at it but seems like a good solution.
Caveat 1 - the user must have permissions for writing files both from AFX and the OS.
So for instance where I work all the Macs have the Programs folders restricted, so this would not work for these average users.
I suppose you could integrate the creation of an icon button and then a substitute of text if access was denied...
Actually on my system it has started working again, no idea why....!!
Copy link to clipboard
Copied
To your caveat, Folder.userData.fsName points to a user owned directory. For me on OSX it's /Users/michaeldelaney/Library/Application Support. So they should always have permission to write to it.
Actually on my system it has started working again, no idea why....!!
Interesting, did you update recentely or something?
Copy link to clipboard
Copied
Hi there, havn't a clue, it just decided to start working again - no problem. Nothing updated so can't pinpoint the issue.
Copy link to clipboard
Copied
I encountered this strange issue just today as well. I noticed that if I use Edit -> Purge -> All, and then start the script, I do not get the "Unable to create temporary image" error. When I quit, AE, and start the script over, the error re-appears. Strange. . .
Copy link to clipboard
Copied
I've had quirks with cached parts of a timeline before. Purging may have resolved the issue by forcing AE to update the data.
Copy link to clipboard
Copied
Don't know guys I had this problem for about 6months across all conditions.
That leaves me to believe it is some conflict within AE.
Copy link to clipboard
Copied
Did you end up implementing the write-to-disk-then-load solution that fusepilot mentions?
Thanks,
Arie
Copy link to clipboard
Copied
No I never did, I leave out the binary code and just error check the presence of a folder and icon images. Suits fine as I am always editing icons/ changing things around.
Copy link to clipboard
Copied
How do you handle portability of the scripts? Have your users ever had issues with installs?
Thanks,
Arie
Copy link to clipboard
Copied
Hey Arie,
Portability just means that I usually have a folder with settings/help/images with each jsx file.
So I just check for its presence on startup and if it's not there I alert the user and exit.
Not as tidy as one file but it will do the job.
Its very seldom someone has an issue.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now