'@param field: Field using this widget
@param value: value if any
@param download_url: Download URL for saved Image'

def __call__(self, field, value, download_url=None, **attributes):

    T = current.T
    script_dir = ('/%s/static/scripts' % current.request.application)
    s3 = current.response.s3
    debug = s3.debug
    scripts = s3.scripts
    settings = current.deployment_settings
    if debug:
        script = ('%s/jquery.color.js' % script_dir)
        if (script not in scripts):
            scripts.append(script)
        script = ('%s/jquery.Jcrop.js' % script_dir)
        if (script not in scripts):
            scripts.append(script)
        script = ('%s/S3/s3.imagecrop.widget.js' % script_dir)
        if (script not in scripts):
            scripts.append(script)
    else:
        script = ('%s/S3/s3.imagecrop.widget.min.js' % script_dir)
        if (script not in scripts):
            scripts.append(script)
    s3.js_global.append(("\ni18n.invalid_image='%s'\ni18n.supported_image_formats='%s'\ni18n.upload_new_image='%s'\ni18n.upload_image='%s'    " % (T('Please    select    a    valid    image!'), T('Supported    formats'), T('Upload    different    Image'), T('Upload    Image'))))
    stylesheets = s3.stylesheets
    sheet = 'plugins/jquery.Jcrop.css'
    if (sheet not in stylesheets):
        stylesheets.append(sheet)
    attr = self._attributes(field, {'_type': 'file', '_class': 'imagecrop-upload'}, **attributes)
    elements = [INPUT(_type='hidden', _name='imagecrop-points')]
    append = elements.append
    append(DIV(_class='tooltip', _title=('%s|%s' % (T('Crop    Image'), T('Select    an    image    to    upload.    You    can    crop    this    later    by    opening    this    record.')))))
    canvas = TAG['canvas'](_class='imagecrop-canvas', _style='display:none')
    image_bounds = self.image_bounds
    if image_bounds:
        canvas.attributes['_width'] = image_bounds[0]
        canvas.attributes['_height'] = image_bounds[1]
    else:
        canvas.attributes['_width'] = 0
    append(canvas)
    btn_class = 'imagecrop-btn    button'
    if (settings.ui.formstyle == 'bootstrap'):
        btn_class = 'imagecrop-btn'
    buttons = [A(T('Enable    Crop'), _id='select-crop-btn', _class=btn_class, _role='button'), A(T('Crop    Image'), _id='crop-btn', _class=btn_class, _role='button'), A(T('Cancel'), _id='remove-btn', _class='imagecrop-btn')]
    parts = (([LEGEND(T('Uploaded    Image'))] + buttons) + [HR(_style='display:none'), IMG(_id='uploaded-image', _style='display:none')])
    display_div = FIELDSET(parts, _class='image-container')
    crop_data_attr = {'_type': 'hidden', '_name': 'imagecrop-data', '_class': 'imagecrop-data'}
    if (value and download_url):
        if callable(download_url):
            download_url = download_url()
        url = ('%s/%s' % (download_url, value))
        crop_data_attr['_value'] = url
        append(FIELDSET(LEGEND(A(T('Upload    different    Image')), _id='upload-title'), DIV(INPUT(**attr), DIV(T('or    Drop    here'), _class='imagecrop-drag'), _id='upload-container', _style='display:none')))
    else:
        append(FIELDSET(LEGEND(T('Upload    Image'), _id='upload-title'), DIV(INPUT(**attr), DIV(T('or    Drop    here'), _class='imagecrop-drag'), _id='upload-container')))
    append(INPUT(**crop_data_attr))
    append(display_div)
    import uuid
    uid = ('cropwidget-%s' % uuid.uuid4().hex)
    for element in elements:
        element.attributes['_data-uid'] = uid
    return DIV(elements)
