Example #1
0
def test8():
    pid = 'http://ifcb-data.whoi.edu/IFCB1_2011_231_182610_09147'
    target_png = E.resolve(pid)
    with open('/Users/jfutrelle/Pictures/bad2.png', 'w') as f:
        target2image(target_png, 'png', f)
Example #2
0
def test8():
    pid = 'http://ifcb-data.whoi.edu/IFCB1_2011_231_182610_09147'
    target_png = E.resolve(pid)
    with open('/Users/jfutrelle/Pictures/bad2.png','w') as f:
        target2image(target_png,'png', f)
Example #3
0
     print h
 if isinstance(object, BinFile) or isinstance(
         object, StitchedBin):  # is the object a bin?
     {
         'rdf': bin2rdf,
         'xml': bin2xml,
         'html': bin2html,
         'json': bin2json,
         'adc': bin2adc,
         'csv': bin2csv,
         'roi': bin2roi,
         'hdr': bin2hdr,
         'zip': bin2zip
     }[format](object, out, detail)  # convert it to format
 elif re.search('^image/', mime_type):  # is it an image?
     target2image(object, IMAGE_FORMATS[mime_type], out,
                  scale)  # produce the image
 elif isinstance(object, Target) or isinstance(
         object, StitchedTarget):  # is it a target?
     {
         'rdf': target2rdf,
         'xml': target2xml,
         'html': target2html,
         'json': target2json
     }[format](object)  # convert it to format
 elif isinstance(object, DayDir):  # is it a day dir?
     {
         'rdf': day2rdf,
         'xml': day2xml,
         'html': day2html,
         'json': day2json
     }[format](object)  # convert it to format