|
Apple's Image Exporter PluginI want to be able to write images out of QC and Apple's "Image Exporter" plugin is a good start. Unfortunately, it does not allow for custom file names, only the path. Files are always called "Image-00001.png" and the index is increased every time a new image is written. I tried to muck around with the plugin source code to change it that the path input is used as path + filename. but it turned out i do not know enough about c#, tried but could not figure it out. i know it is very simple, this is the relevant code snippet: fileURL = [NSURL fileURLWithPath: how do i change it to use self.inputPath as the path and filename? plugin xcode source: http://developer.apple.com/mac/library/samplecode/ImageExporter/Introduc... thx for your help
|
You would need to be creating an input in Cocoa to allow for the setting of a special name with numeric accretion.
BTW , this doesn't solve the coding problem you face, but it does give more control, see this post http://kineme.net/forum/Discussion/DevelopingCompositions/Howexportimage...
Try replacing the fileURL line with this one*:
fileURL = [NSURL fileURLWithPath:[self.inputPath stringByStandardizingPath]];
On the same subject, I've had a nearly-finished replacement for the image exporter written for weeks now, but I'm still stuck when it comes to getting a 16/32bit colour image out of QC. I've done this without difficulty in an actual application, it's the QCPlugin part that's throwing me.
I asked on the QC mailing list without any real response, anyone care to help? Here's my last email to the list:
although your suggestion has some merits in some context, unfortunately it doesn't produce a custom file name output option
PSonics thanks so much. works like a charm. a custom path + image file name (for instance "~/Desktop/test_01.png" is now accepted as plugin input.
I attached the compiled version of the modified image exporter plugin.
That's interesting that psonice's suggestion works AOK for you. I downloaded and tried your plugin [10.6.4] and I got no output at 64 bit and correct output at 32 bit.
Wish I'd tried that with my code experiments, which were actually looking at outputting a series of numbered files of .png ext with a particular name appended rather than a single file.
Apologies to you psonice, I had based my previous post solely upon the results in 64 bit QC without even thinking about it.
Of course, that still leaves the question as to why that doesn't work in QC 64 bit.
No problem. I don't get why this isn't working for you - unless Volkerk has done something else to the plugin (seems unlikely), this should just be the standard apple image exporter plugin. The only change is that it now writes to a single filename and not a sequence.
I'm actually using a near-identical plugin in a project (my only changes were to write out jpeg instead of png, and to use a timestamp instead of a number sequence). It's working fine under QC in 64bit mode (in fact it's been running fine for literally months, 24/7!)
QC on my machine as set to 32 bit and after i switched to 64, the plugin was still working. Make sure you have it enabled and export happens once you change the image at the input (can be done with a multiplexer)
v.