How to add jpeg 2000 format to razuna!


#1

After a while of messing with the code I have figured out how to add the jpeg 2000 format. Here is the proof:


The second:

So here’s what you have to do.
Move to your folder where you have installed razuna. Then move to razuna_tomcat_1_7/tomcat/webapps/razuna/global/host/dam/js
and delete the file “files.cfm”. Now make a folder here called “files.cfm” and paste this inside it:

<script language="javascript" type="text/javascript">

// Create Version
// function vercreate(fileid, type, tempid){
//     $("#status").css("display","");
//     $("#status").html('<cfoutput>#myFusebox.getApplicationData().defaults.trans("versions_create_progress")#</cfoutput>');
//     $("#status").animate({opacity: 1.0}, 3000).fadeTo("slow", 0.33);
//     // Submit Form
//     loadcontent('versionlist','index.cfm?fa=c.versions_add&file_id=' + fileid + '&type=' + type + '&tempid=' + tempid);
// }
// Playback Version
function verplayback(fileid, type, version, folder_id){
    $("#status").css("display","");
    $("#status").html('<cfoutput>#myFusebox.getApplicationData().defaults.trans("versions_playback_progress")#</cfoutput>');
    $("#status").animate({opacity: 1.0}, 3000).fadeTo("slow", 0.33);
    // Submit Form
    loadcontent('versionlist','index.cfm?fa=c.versions_playback&file_id=' + fileid + '&type=' + type + '&version=' + version + '&folder_id=' + folder_id);
}
function reloadfilelisting(theid){
    if(theid == ""){
        theid = 0;
    }
    // Reload Explorer
    loadcontent('explorer','index.cfm?fa=c.explorer&folder_id=' + theid);
}

// Batch Actions

// Selected to Basket
function sendtobasket(theform, from){
    // Define empty theids var
    var theids = '';
    var thekind = '';
       // If we come from search we need to get the searchids again since we overwrite it with editids
       if (typeof from !== 'undefined' && from === 'search') {
           theids = $('#searchlistids').val(); 
           thekind = 'search';
       };
       // Get values
    var url = 'index.cfm?fa=c.basket_put_include';
    var items = '&thekind=' + thekind + '&edit_ids=' + theids;
    // Submit Form
    $.ajax({
        type: "POST",
        url: url,
        data: items,
           success: sendtobasket_feedback
    });
}

// Feedback on putting assets in basket
function sendtobasket_feedback(){
    // Flash the Basket
    flash_footer('basket');
    // Reload Basket
    loadcontent('thedropbasket','index.cfm?fa=c.basket');
}

// General Batch Actions
function batchaction(theform, what, kind, folder_id, theaction){
    // Decide the what
    if(what == 'files')what = 'doc';
    if(what == 'images')what = 'img';
    if(what == 'videos')what = 'vid';
    if(what == 'audios')what = 'aud';
    if(what == 'all')what = 'all';
       // If this comes from the search or labels we need to swap the session with the file ids since edit function is in session.editids
       if (kind === 'search' || kind === 'labels') {
           $('#div_forall').load('index.cfm?fa=c.swap_store_file_ids');
       }
    // Get to work
    switch (theaction){
        case "alias":
            showwindow('index.cfm?fa=c.move_file&type=alias&thetype=' + what + '&folder_id=' + folder_id + '&kind=' + kind, '<cfoutput>#myFusebox.getApplicationData().defaults.trans("alias_create")#</cfoutput>', 550, 1);
            break;
        case "move":
            showwindow('index.cfm?fa=c.move_file&type=movefile&thetype=' + what + '&folder_id=' + folder_id + '&kind=' + kind, '<cfoutput>#myFusebox.getApplicationData().defaults.trans("move_file")#</cfoutput>', 550, 1);
            break;
        case "batch":
            showwindow('index.cfm?fa=c.batch_form&file_id=0&what=' + what + '&folder_id=' + folder_id, '<cfoutput>#myFusebox.getApplicationData().defaults.trans("batch_selected_header")#</cfoutput>', 650, 1);
              break;
        case "delete":
            //alert('trash');
            showwindow('index.cfm?fa=ajax.trash_record&many=T&what=' + what + '&loaddiv=' + kind + '&folder_id=' + folder_id, '<cfoutput>#myFusebox.getApplicationData().defaults.trans("trash")#</cfoutput>', 400, 1);
            break;
        case "chcoll":
            showwindow('index.cfm?fa=c.choose_collection&artofimage=list&artofvideo=&artofaudio=&artoffile=&thetype=' + what, '<cfoutput>#myFusebox.getApplicationData().defaults.trans("add_to_collection")#</cfoutput>', 550, 1);
            break;
        case "exportmeta":
            showwindow('index.cfm?fa=c.meta_export&what=&thetype=' + what, '<cfoutput>#myFusebox.getApplicationData().defaults.trans("header_export_metadata")#</cfoutput>', 600, 1);
            break;
        case "shareon":
            // Show loading gif
            loadinggif("feedback_delete_" + kind);
            // Do the action
            $("#dummy_" + kind).load('index.cfm?fa=c.batch_sharing&state=t&file_ids=' + fileids + '&folder_id=' + folder_id);
            // Show feedback
            $("#feedback_delete_" + kind).html('<div style="width:200px;">Sharing enabled</div>');
            break;
        case "shareoff":
            // Show loading gif
            loadinggif("feedback_delete_" + kind);
            // Do the action
            $("#dummy_" + kind).load('index.cfm?fa=c.batch_sharing&state=f&file_ids=' + fileids + '&folder_id=' + folder_id);
            // Show feedback
            $("#feedback_delete_" + kind).html('<div style="width:200px;">Sharing disabled</div>');
            break;
        case "prev":
            showwindow('index.cfm?fa=ajax.recreate_previews&thetype=' + what, '<cfoutput>#myFusebox.getApplicationData().defaults.trans("batch_recreate_preview")#</cfoutput>', 550, 1);
            break;
    }
}
// For Image Coversion
function convertimages(theform){
    // Loop over the convert_to checkboxes
    var convertto = '';
    for (var i = 0; i<document.forms[theform].elements.length; i++) {
       if ((document.forms[theform].elements[i].name.indexOf('convert_to') > -1)) {
           if (document.forms[theform].elements[i].checked) {
                   convertto += document.forms[theform].elements[i].value + ',';
               }
          }
       }
       if (convertto=='')
       {
           alert('Please select atleast one format to convert to.');
           return;
       }
    // Send Feedback to Div
       document.getElementById('statusconvert').style.visibility = "visible";
    $("#statusconvert").html('<cfoutput>#JSStringFormat(myFusebox.getApplicationData().defaults.trans("convert_feedback"))#</cfoutput>');
    $("#statusconvert").animate({opacity: 1.0}, 3000).fadeTo("slow", 0.33);
    // Get values
    var file_id = $('#' + theform + ' #file_id').val();
    var theorgname = $('#' + theform + ' #theorgname').val();
    var thepath = $('#' + theform + ' #thepath').val();
    var link_kind = $('#' + theform + ' #link_kind').val();
    var link_path_url = $('#' + theform + ' #link_path_url').val();
    var convert_width_jpg = $('#' + theform + ' #convert_width_jpg').val();
    var convert_height_jpg = $('#' + theform + ' #convert_height_jpg').val();
    var convert_dpi_jpg = $('#' + theform + ' #convert_dpi_jpg').val();
    var convert_width_gif = $('#' + theform + ' #convert_width_gif').val();
    var convert_height_gif = $('#' + theform + ' #convert_height_gif').val();
    var convert_dpi_gif = $('#' + theform + ' #convert_dpi_gif').val();
    var convert_width_png = $('#' + theform + ' #convert_width_png').val();
    var convert_height_png = $('#' + theform + ' #convert_height_png').val();
    var convert_dpi_png = $('#' + theform + ' #convert_dpi_png').val();
    var convert_width_tif = $('#' + theform + ' #convert_width_tif').val();
    var convert_height_tif = $('#' + theform + ' #convert_height_tif').val();
    var convert_dpi_tif = $('#' + theform + ' #convert_dpi_tif').val();
    var convert_width_bmp = $('#' + theform + ' #convert_width_bmp').val();
    var convert_height_bmp = $('#' + theform + ' #convert_height_bmp').val();
    var convert_dpi_bmp = $('#' + theform + ' #convert_dpi_bmp').val();
    var convert_width_jp2 = $('#' + theform + ' #convert_width_jp2').val();
    var convert_height_jp2 = $('#' + theform + ' #convert_height_jp2').val();
    var convert_dpi_jp2 = $('#' + theform + ' #convert_dpi_jp2').val();
    var convert_wm_jpg = $('#' + theform + ' #convert_wm_jpg option:selected').val();
    var convert_wm_gif = $('#' + theform + ' #convert_wm_gif option:selected').val();
    var convert_wm_png = $('#' + theform + ' #convert_wm_png option:selected').val();
    var convert_wm_tif = $('#' + theform + ' #convert_wm_tif option:selected').val();
    var convert_wm_bmp = $('#' + theform + ' #convert_wm_bmp option:selected').val();
    var convert_wm_jp2 = $('#' + theform + ' #convert_wm_j2k option:selected').val();
    
    var inch_width_jpg = $('#' + theform + ' #inch_width_jpg').val();
    var inch_height_jpg = $('#' + theform + ' #inch_height_jpg').val();
    var inch_width_gif = $('#' + theform + ' #inch_width_gif').val();
    var inch_height_gif = $('#' + theform + ' #inch_height_gif').val();
    var inch_width_png = $('#' + theform + ' #inch_width_png').val();
    var inch_height_png = $('#' + theform + ' #inch_height_png').val();
    var inch_width_tif = $('#' + theform + ' #inch_width_tif').val();
    var inch_height_tif = $('#' + theform + ' #inch_height_tif').val();
    var inch_width_bmp = $('#' + theform + ' #inch_width_bmp').val();
    var inch_height_bmp = $('#' + theform + ' #inch_height_bmp').val();
    var inch_width_jp2 = $('#' + theform + ' #inch_width_jp2').val();
    var inch_height_jp2 = $('#' + theform + ' #inch_height_jp2').val();

    var formatbox_jpg = $('#' + theform + ' #formatbox_jpg').val();
    var formatbox_gif = $('#' + theform + ' #formatbox_gif').val();
    var formatbox_png = $('#' + theform + ' #formatbox_png').val();
    var formatbox_bmp = $('#' + theform + ' #formatbox_bmp').val();
    var formatbox_tif = $('#' + theform + ' #formatbox_tif').val();
    var formatbox_jp2 = $('#' + theform + ' #formatbox_jp2').val();

    var xres = $('#' + theform + ' #xres').val();
    var yres = $('#' + theform + ' #yres').val();
    var resunit = $('#' + theform + ' #resunit').val();

    // Call the Action
    $('#statusconvertdummy').load('index.cfm?fa=c.images_convert', { convert_to:convertto, file_id:file_id, theorgname:theorgname, thepath:thepath, link_kind:link_kind, link_path_url:link_path_url, convert_width_jpg:convert_width_jpg, convert_height_jpg:convert_height_jpg, convert_dpi_jpg:convert_dpi_jpg, convert_width_jp2:convert_width_jp2, convert_height_jp2:convert_height_jp2, convert_dpi_jp2:convert_dpi_jp2, convert_width_gif:convert_width_gif, convert_height_gif:convert_height_gif, convert_dpi_gif:convert_dpi_gif, convert_width_png:convert_width_png, convert_height_png:convert_height_png, convert_dpi_png:convert_dpi_png, convert_width_tif:convert_width_tif, convert_height_tif:convert_height_tif, convert_dpi_tif:convert_dpi_tif, convert_width_bmp:convert_width_bmp, convert_height_bmp:convert_height_bmp, convert_dpi_bmp:convert_dpi_bmp, convert_wm_jpg:convert_wm_jpg, convert_wm_jp2:convert_wm_jp2, convert_wm_gif:convert_wm_gif, convert_wm_png:convert_wm_png, convert_wm_tif:convert_wm_tif, convert_wm_bmp:convert_wm_bmp ,inch_width_jpg : inch_width_jpg,inch_height_jpg :  inch_height_jpg, inch_width_jp2 : inch_width_jp2,inch_height_jp2 : inch_height_jp2, inch_width_gif :  inch_width_gif, inch_height_gif :  inch_height_gif, inch_width_png :  inch_width_png,  inch_height_png :  inch_height_png,  inch_width_tif :  inch_width_tif, inch_height_tif : inch_height_tif,  inch_width_bmp :  inch_width_bmp, inch_height_bmp :  inch_height_bmp, formatbox_jpg:formatbox_jpg, formatbox_jp2:formatbox_jp2, formatbox_png:formatbox_png, formatbox_gif:formatbox_gif, formatbox_bmp:formatbox_bmp, formatbox_tif:formatbox_tif, xres:xres, yres:yres,resunit:resunit} );
}
// For Image Renditions
function convertexistimgrenditions(theform){
    // Loop over the convert_to checkboxes
    var convertto = '';
    for (var i = 0; i<document.forms[theform].elements.length; i++) {
       if ((document.forms[theform].elements[i].name.indexOf('convert_to') > -1)) {
           if (document.forms[theform].elements[i].checked) {
                   convertto += document.forms[theform].elements[i].value + ',';
               }
          }
       }
       if (convertto=='')
       {
           alert('Please select atleast one format to convert to.');
           return;
       }
    // Send Feedback to Div
       document.getElementById('statusconvertreditions').style.visibility = "visible";
    $("#statusconvertreditions").html('<cfoutput>#JSStringFormat(myFusebox.getApplicationData().defaults.trans("convert_feedback"))#</cfoutput>');
    $("#statusconvertreditions").animate({opacity: 1.0}, 3000).fadeTo("slow", 0.33);
    // Get values
    var file_id = $('#' + theform + ' #file_id').val();
    var img_group_id = $('#' + theform + ' #img_group_id').val();
    var theorgname = $('#' + theform + ' #theorgname').val();
    var thepath = $('#' + theform + ' #thepath').val();
    var link_kind = $('#' + theform + ' #link_kind').val();
    var link_path_url = $('#' + theform + ' #link_path_url').val();
    var convert_width_jpg = $('#' + theform + ' #convert_width_jpg').val();
    var convert_height_jpg = $('#' + theform + ' #convert_height_jpg').val();
    var convert_dpi_jpg = $('#' + theform + ' #convert_dpi_jpg').val();
    var convert_width_gif = $('#' + theform + ' #convert_width_gif').val();
    var convert_height_gif = $('#' + theform + ' #convert_height_gif').val();
    var convert_dpi_gif = $('#' + theform + ' #convert_dpi_gif').val();
    var convert_width_png = $('#' + theform + ' #convert_width_png').val();
    var convert_height_png = $('#' + theform + ' #convert_height_png').val();
    var convert_dpi_png = $('#' + theform + ' #convert_dpi_png').val();
    var convert_width_tif = $('#' + theform + ' #convert_width_tif').val();
    var convert_height_tif = $('#' + theform + ' #convert_height_tif').val();
    var convert_dpi_tif = $('#' + theform + ' #convert_dpi_tif').val();
    var convert_width_bmp = $('#' + theform + ' #convert_width_bmp').val();
    var convert_height_bmp = $('#' + theform + ' #convert_height_bmp').val();
    var convert_dpi_bmp = $('#' + theform + ' #convert_dpi_bmp').val();
    var convert_width_jp2 = $('#' + theform + ' #convert_width_jp2').val();
    var convert_height_jp2 = $('#' + theform + ' #convert_height_jp2').val();
    var convert_dpi_jp2 = $('#' + theform + ' #convert_dpi_jp2').val();
    var convert_wm_jpg = $('#' + theform + ' #convert_wm_jpg option:selected').val();
    var convert_wm_gif = $('#' + theform + ' #convert_wm_gif option:selected').val();
    var convert_wm_png = $('#' + theform + ' #convert_wm_png option:selected').val();
    var convert_wm_tif = $('#' + theform + ' #convert_wm_tif option:selected').val();
    var convert_wm_bmp = $('#' + theform + ' #convert_wm_bmp option:selected').val();
    var convert_wm_jp2 = $('#' + theform + ' #convert_wm_jp2 option:selected').val();

    var inch_width_jpg = $('#' + theform + ' #inch_width_jpg').val();
    var inch_height_jpg = $('#' + theform + ' #inch_height_jpg').val();
    var inch_width_gif = $('#' + theform + ' #inch_width_gif').val();
    var inch_height_gif = $('#' + theform + ' #inch_height_gif').val();
    var inch_width_png = $('#' + theform + ' #inch_width_png').val();
    var inch_height_png = $('#' + theform + ' #inch_height_png').val();
    var inch_width_tif = $('#' + theform + ' #inch_width_tif').val();
    var inch_height_tif = $('#' + theform + ' #inch_height_tif').val();
    var inch_width_bmp = $('#' + theform + ' #inch_width_bmp').val();
    var inch_height_bmp = $('#' + theform + ' #inch_height_bmp').val();
    var inch_width_jp2 = $('#' + theform + ' #inch_width_jp2').val();
    var inch_height_jp2 = $('#' + theform + ' #inch_height_jp2').val();

    var formatbox_jpg = $('#' + theform + ' #formatbox_jpg').val();
    var formatbox_gif = $('#' + theform + ' #formatbox_gif').val();
    var formatbox_png = $('#' + theform + ' #formatbox_png').val();
    var formatbox_bmp = $('#' + theform + ' #formatbox_bmp').val();
    var formatbox_tif = $('#' + theform + ' #formatbox_tif').val();
    var formatbox_jp2 = $('#' + theform + ' #formatbox_jp2').val();
    
    var xres = $('#' + theform + ' #xres').val();
    var yres = $('#' + theform + ' #yres').val();
    var resunit = $('#' + theform + ' #resunit').val();
    // Call the Action
    $('#statusrenditionconvertdummy').load('index.cfm?fa=c.rendition_images_convert', { convert_to:convertto, file_id:file_id, img_group_id:img_group_id, theorgname:theorgname, thepath:thepath, link_kind:link_kind, link_path_url:link_path_url, convert_width_jpg:convert_width_jpg, convert_height_jpg:convert_height_jpg, convert_dpi_jpg:convert_dpi_jpg, convert_width_jp2:convert_width_jp2,
convert_height_jp2:convert_height_jp2, convert_dpi_jp2:convert_dpi_jp2, convert_width_gif:convert_width_gif, convert_height_gif:convert_height_gif, convert_dpi_gif:convert_dpi_gif, convert_width_png:convert_width_png, convert_height_png:convert_height_png, convert_dpi_png:convert_dpi_png, convert_width_tif:convert_width_tif, convert_height_tif:convert_height_tif, convert_dpi_tif:convert_dpi_tif, convert_width_bmp:convert_width_bmp, convert_height_bmp:convert_height_bmp, convert_dpi_bmp:convert_dpi_bmp, convert_wm_jpg:convert_wm_jpg, convert_wm_jp2:convert_wm_jp2, convert_wm_gif:convert_wm_gif, convert_wm_png:convert_wm_png, convert_wm_tif:convert_wm_tif, convert_wm_bmp:convert_wm_bmp,inch_width_jpg : inch_width_jpg, inch_height_jpg :  inch_height_jpg, inch_width_jp2 : inch_width_jp2, inch_height_jp2 :  inch_height_jp2, inch_width_gif :  inch_width_gif, inch_height_gif :  inch_height_gif, inch_width_png :  inch_width_png,  inch_height_png :  inch_height_png,  inch_width_tif :  inch_width_tif, inch_height_tif : inch_height_tif,  inch_width_bmp :  inch_width_bmp, inch_height_bmp :  inch_height_bmp, formatbox_jpg:formatbox_jpg, formatbox_jp2:formatbox_jp2, formatbox_png:formatbox_png, formatbox_gif:formatbox_gif, formatbox_bmp:formatbox_bmp, formatbox_tif:formatbox_tif, xres:xres, yres:yres, resunit:resunit} );
}
// For Video Coversion
function convertvideos(theform){
    // Loop over the convert_to checkboxes
    var convertto = '';
    for (var i = 0; i<document.forms[theform].elements.length; i++) {
       if ((document.forms[theform].elements[i].name.indexOf('convert_to') > -1)) {
           if (document.forms[theform].elements[i].checked) {
                   convertto += document.forms[theform].elements[i].value + ',';
               }
          }
       }
       if (convertto=='')
       {
           alert('Please select atleast one format to convert to.');
           return;
       }
    // Send Feedback to Div
    document.getElementById('statusconvert').style.visibility = "visible";
    $("#statusconvert").html('<cfoutput>#JSStringFormat(myFusebox.getApplicationData().defaults.trans("convert_feedback"))#</cfoutput>');
    $("#statusconvert").animate({opacity: 1.0}, 3000).fadeTo("slow", 0.33);
    // Call the Action
    loadcontent('statusconvertdummy','index.cfm?fa=c.videos_convert&file_id=' + document.forms[theform].file_id.value + '&theorgname=' + escape(document.forms[theform].theorgname.value) + '&thepath=' + document.forms[theform].thepath.value + '&convert_width_wmv=' + document.forms[theform].convert_width_wmv.value + '&convert_height_wmv=' + document.forms[theform].convert_height_wmv.value + '&convert_width_avi=' + document.forms[theform].convert_width_avi.value + '&convert_height_avi=' + document.forms[theform].convert_height_avi.value + '&convert_width_mov=' + document.forms[theform].convert_width_mov.value + '&convert_height_mov=' + document.forms[theform].convert_height_mov.value + '&convert_width_mxf=' + document.forms[theform].convert_width_mxf.value + '&convert_height_mxf=' + document.forms[theform].convert_height_mxf.value + '&convert_width_mpg=' + document.forms[theform].convert_width_mpg.value + '&convert_height_mpg=' + document.forms[theform].convert_height_mpg.value + '&convert_width_mp4=' + document.forms[theform].convert_width_mp4.value + '&convert_height_mp4=' + document.forms[theform].convert_height_mp4.value + '&convert_wh_3gp=' + document.forms[theform].convert_wh_3gp.value + '&convert_width_flv=' + document.forms[theform].convert_width_flv.value + '&convert_height_flv=' + document.forms[theform].convert_height_flv.value + '&convert_width_rm=' + document.forms[theform].convert_width_rm.value + '&convert_height_rm=' + document.forms[theform].convert_height_rm.value  + '&convert_width_ogv=' + document.forms[theform].convert_width_ogv.value + '&convert_height_ogv=' + document.forms[theform].convert_height_ogv.value  + '&convert_width_webm=' + document.forms[theform].convert_width_webm.value + '&convert_height_webm=' + document.forms[theform].convert_height_webm.value + '&convert_to=' + convertto + '&convert_width_3gp=' + document.forms[theform].convert_width_3gp.value + '&convert_height_3gp=' + document.forms[theform].convert_height_3gp.value + '&theorgext=' + document.forms[theform].theorgext.value + '&link_kind=' + document.forms[theform].link_kind.value + '&link_path_url=' + escape(document.forms[theform].link_path_url.value));
}
// For Video Renditions
function convertexistvidrenditions(theform){
    // Loop over the convert_to checkboxes
    var convertto = '';
    for (var i = 0; i<document.forms[theform].elements.length; i++) {
       if ((document.forms[theform].elements[i].name.indexOf('convert_to') > -1)) {
           if (document.forms[theform].elements[i].checked) {
                   convertto += document.forms[theform].elements[i].value + ',';
               }
          }
       }
       if (convertto=='')
       {
           alert('Please select atleast one format to convert to.');
           return;
       }
    // Send Feedback to Div
       document.getElementById('statusconvertreditions').style.visibility = "visible";
    $("#statusconvertreditions").html('<cfoutput>#JSStringFormat(myFusebox.getApplicationData().defaults.trans("convert_feedback"))#</cfoutput>');
    $("#statusconvertreditions").animate({opacity: 1.0}, 3000).fadeTo("slow", 0.33);
    // Call the Action
    loadcontent('statusrenditionconvertdummy','index.cfm?fa=c.rendition_videos_convert&file_id=' + document.forms[theform].file_id.value + '&vid_group_id=' + escape(document.forms[theform].vid_group_id.value)+ '&theorgname=' + escape(document.forms[theform].theorgname.value) + '&thepath=' + document.forms[theform].thepath.value + '&convert_width_wmv=' + document.forms[theform].convert_width_wmv.value + '&convert_height_wmv=' + document.forms[theform].convert_height_wmv.value + '&convert_width_avi=' + document.forms[theform].convert_width_avi.value + '&convert_height_avi=' + document.forms[theform].convert_height_avi.value + '&convert_width_mov=' + document.forms[theform].convert_width_mov.value + '&convert_height_mov=' + document.forms[theform].convert_height_mov.value + '&convert_width_mxf=' + document.forms[theform].convert_width_mxf.value + '&convert_height_mxf=' + document.forms[theform].convert_height_mxf.value + '&convert_width_mpg=' + document.forms[theform].convert_width_mpg.value + '&convert_height_mpg=' + document.forms[theform].convert_height_mpg.value + '&convert_width_mp4=' + document.forms[theform].convert_width_mp4.value + '&convert_height_mp4=' + document.forms[theform].convert_height_mp4.value + '&convert_wh_3gp=' + document.forms[theform].convert_wh_3gp.value + '&convert_width_flv=' + document.forms[theform].convert_width_flv.value + '&convert_height_flv=' + document.forms[theform].convert_height_flv.value + '&convert_width_rm=' + document.forms[theform].convert_width_rm.value + '&convert_height_rm=' + document.forms[theform].convert_height_rm.value  + '&convert_width_ogv=' + document.forms[theform].convert_width_ogv.value + '&convert_height_ogv=' + document.forms[theform].convert_height_ogv.value  + '&convert_width_webm=' + document.forms[theform].convert_width_webm.value + '&convert_height_webm=' + document.forms[theform].convert_height_webm.value + '&convert_to=' + convertto + '&convert_width_3gp=' + document.forms[theform].convert_width_3gp.value + '&convert_height_3gp=' + document.forms[theform].convert_height_3gp.value + '&theorgext=' + document.forms[theform].theorgext.value + '&link_kind=' + document.forms[theform].link_kind.value + '&link_path_url=' + escape(document.forms[theform].link_path_url.value));
}
// For Audio Coversion
function convertaudios(theform){
    // Loop over the convert_to checkboxes
    var convertto = '';
    for (var i = 0; i<document.forms[theform].elements.length; i++) {
       if ((document.forms[theform].elements[i].name.indexOf('convert_to') > -1)) {
           if (document.forms[theform].elements[i].checked) {
                   convertto += document.forms[theform].elements[i].value + ',';
               }
          }
       }
       if (convertto=='')
       {
           alert('Please select atleast one format to convert to.');
           return;
       }

    // Send Feedback to Div
       $("#statusconvert").css("display","");
    $("#statusconvert").fadeTo("fast", 100);
    $("#statusconvert").html('<cfoutput>#JSStringFormat(myFusebox.getApplicationData().defaults.trans("convert_feedback"))#</cfoutput>');
    $("#statusconvert").animate({opacity: 1.0}, 3000).fadeTo("slow", 0.33);
    // Get values
    var bitmp3 = $('#convert_bitrate_mp3').val();
    var bitogg = $('#convert_bitrate_ogg').val();
    var orgext = $('#theorgext').val();
    var orgname = escape($('#theorgname').val());
    var fileid = $('#file_id').val();
    var thepath = escape($('#thepath').val());
    var link_kind = $('#link_kind').val();
    // Call the Action
    loadcontent('statusconvertdummy','index.cfm?fa=c.audios_convert&convert_to=' + convertto + '&file_id=' + fileid + '&theorgname=' + orgname + '&thepath=' + thepath + '&convert_bitrate_mp3=' + bitmp3 + '&convert_bitrate_ogg=' + bitogg + '&theorgext=' + orgext + '&link_kind=' + link_kind);
}
// For Audio Renditions
function convertexistaudrenditions(theform){
    // Loop over the convert_to checkboxes
    var convertto = '';
    for (var i = 0; i<document.forms[theform].elements.length; i++) {
       if ((document.forms[theform].elements[i].name.indexOf('convert_to') > -1)) {
           if (document.forms[theform].elements[i].checked) {
                   convertto += document.forms[theform].elements[i].value + ',';
               }
          }
       }
       if (convertto=='')
       {
           alert('Please select at least one format to convert to.');
           return;
       }
    // Send Feedback to Div
       $("#statusconvertreditions").css("display","");
    $("#statusconvertreditions").fadeTo("fast", 100);
    $("#statusconvertreditions").html('<cfoutput>#JSStringFormat(myFusebox.getApplicationData().defaults.trans("convert_feedback"))#</cfoutput>');
    $("#statusconvertreditions").animate({opacity: 1.0}, 3000).fadeTo("slow", 0.33);
    // Get values
    var aud_group_id = $('#' + theform + ' #aud_group_id').val();
    var bitmp3 = $('#convert_bitrate_mp3').val();
    var bitogg = $('#convert_bitrate_ogg').val();
    var orgext = $('#theorgext').val();
    var orgname = escape($('#theorgname').val());
    var fileid = $('#file_id').val();
    var thepath = escape($('#thepath').val());
    var link_kind = $('#link_kind').val();
    // Call the Action
    loadcontent('statusrenditionconvertdummy','index.cfm?fa=c.rendition_audios_convert&convert_to=' + convertto + '&file_id=' + fileid + '&aud_group_id=' + aud_group_id + '&theorgname=' + orgname + '&thepath=' + thepath + '&convert_bitrate_mp3=' + bitmp3 + '&convert_bitrate_ogg=' + bitogg + '&theorgext=' + orgext + '&link_kind=' + link_kind);
}
</script>

The function part is complete. Now move to razuna_tomcat_1_7/tomcat/webapps/razuna/global/host/dam/views/ajaxparts and delete the file “dsp_asset_images_convert.cfm”. Now in this directory make a new file called “dsp_asset_images_convert.cfm”. Open it and paste this in it:


#2
<!--- 
* 
* Copyright (C) 2005-2008 Razuna 
* 
* This file is part of Razuna - Enterprise Digital Asset Management. 
* 
* Razuna is free software: you can redistribute it and/or modify 
* it under the terms of the GNU Affero Public License as published by 
* the Free Software Foundation, either version 3 of the License, or 
* (at your option) any later version. 
* 
* Razuna is distributed in the hope that it will be useful, 
* but WITHOUT ANY WARRANTY; without even the implied warranty of 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
* GNU Affero Public License for more details. 
* 
* You should have received a copy of the GNU Affero Public License 
* along with Razuna. If not, see <http://www.gnu.org/licenses/>. 
* 
* You may restribute this Program with a special exception to the terms 
* and conditions of version 3.0 of the AGPL as described in Razuna's 
* FLOSS exception. You should have received a copy of the FLOSS exception 
* along with Razuna. If not, see <http://www.razuna.com/licenses/>. 
* 
---> 
<cfoutput> 
    <cfinclude template="inc_images_links.cfm"> 
    <!--- Flag to specify whether to run javascript calculations on page or not ---> 
    <cfset docalcs = true> 
    <br /> 
    <cfif attributes.folderaccess NEQ "R"> 
        <div class="collapsable"><div class="headers">&gt; Create new renditions</div></div> 
        <br /> 
        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="grid"> 
            <cftry> 
                <cfset theaspectratio = #qry_detail.detail.orgwidth# / #qry_detail.detail.orgheight#> 
                <cfcatch type="any"> 
                    <cfset theaspectratio = 0> 
                </cfcatch> 
            </cftry> 
            <cfif qry_detail.detail.orgheight EQ 0 OR theaspectratio EQ 0 OR qry_xmp.xres EQ 0 OR qry_xmp.resunit NEQ "inches"> 
                <!--- Turn off javascript calculations on page because there is not enough data to support them ---> 
                <cfset docalcs = false> 
            </cfif> 
            <tr class="list"> 
                <input type="hidden" name="xres" id="xres" value="#qry_xmp.xres#"> 
                <input type="hidden" name="yres" id="yres" value="#qry_xmp.yres#"> 
                <input type="hidden" name="resunit" id="resunit" value="#qry_xmp.resunit#"> 
                <td width="1%" nowrap="true"><input type="checkbox" name="convert_to" value="jpg"></td> 
                <td width="1%" nowrap="true"><a href="##" onclick="clickcbk('form#attributes.file_id#','convert_to',0)" style="text-decoration:none;">JPEG (Joint Photographic Experts Group)</a></td> 
                <td width="1%" nowrap="true"><input type="text" size="4" name="convert_width_jpg" id="convert_width_jpg" value="<cfif qry_detail.detail.orgwidth EQ 0>500<cfelse>#qry_detail.detail.orgwidth#</cfif>" <cfif docalcs>onchange="aspectheight(this,'convert_height_jpg','form#attributes.file_id#',#theaspectratio#);"</cfif> maxlength="4">  
                <input type="text" size="4" name="inch_width_jpg" id="inch_width_jpg" <cfif docalcs>onchange="aspectheightin(this,'inch_height_jpg','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_jpg,inch_width_jpg,'convert_height_jpg','convert_width_jpg',#qry_xmp.yres#,#qry_xmp.xres#);"</cfif> maxlength="4" style="display: none;"> x <input type="text" size="4" name="convert_height_jpg" id="convert_height_jpg" value="<cfif qry_detail.detail.orgheight EQ 0>500<cfelse>#qry_detail.detail.orgheight#</cfif>" <cfif docalcs>onchange="aspectwidth(this,'convert_width_jpg','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_height_jpg" id="inch_height_jpg" <cfif docalcs>onchange="aspectwidthin(this,'inch_width_jpg','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_jpg,inch_width_jpg,'convert_height_jpg','convert_width_jpg',#qry_xmp.yres#,#qry_xmp.xres#);" </cfif>maxlength="4" style="display: none;"> 
                <select name="formatbox_jpg" id="formatbox_jpg" <cfif docalcs>onchange="changeFormat('form#attributes.file_id#',convert_height_jpg,convert_width_jpg,'convert_height_jpg','convert_width_jpg',#qry_xmp.xres#,#qry_xmp.yres#,'inch_height_jpg','inch_width_jpg','formatbox_jpg')"</cfif>> 
                    <option value="pixels">Pixels</option> 
                    <cfif docalcs><option value="inches">Inches</option></cfif> 
                </select> 
                or <input type="text" size="4" name="convert_dpi_jpg" id="convert_dpi_jpg" maxlength="3"> dpi 
 
                </td> 
                <!--- Watermark ---> 
                <cfif attributes.wmtemplates.recordcount NEQ 0> 
                    <td width="1%" nowrap="true"> 
                        <select name="convert_wm_jpg" id="convert_wm_jpg"> 
                            <option value="" selected="selected">Apply watermark</option> 
                            <option value="">---</option> 
                            <cfloop query="attributes.wmtemplates"> 
                                <option value="#wm_temp_id#">#wm_name#</option> 
                            </cfloop> 
                        </select> 
                    </td> 
                </cfif> 
                <td rowspan="6" width="100%" nowrap="true" valign="top" style="padding-left:20px;"> 
                    <strong>#myFusebox.getApplicationData().defaults.trans("images_original")#</strong> 
                    <br /> 
                    #myFusebox.getApplicationData().defaults.trans("file_name")#: #qry_detail.detail.img_filename# 
                    <br /> 
                    #myFusebox.getApplicationData().defaults.trans("format")#: #ucase(qry_detail.detail.img_extension)# 
                    <br /> 
                    #myFusebox.getApplicationData().defaults.trans("size")#: #qry_detail.detail.orgwidth#x#qry_detail.detail.orgheight# pixel 
                    <br /> 
                    #myFusebox.getApplicationData().defaults.trans("data_size")#: #qry_detail.thesize# MB 
                    <br /> 
                    ColorSpace: <cfif qry_xmp.colorspace EQ "">could not be read properly for this file<cfelse>#qry_xmp.colorspace#</cfif> 
                    <br /> 
                    <cfif qry_xmp.resunit EQ "inches"> 
                        X Resolution: #qry_xmp.xres# dpi 
                        <br /> 
                        Y Resolution: #qry_xmp.yres# dpi 
                        <br /> 
                        Resolution Unit: #qry_xmp.resunit# 
                    </cfif> 
                </td> 
            </tr> 
            <tr class="list"> 
                <td><input type="checkbox" name="convert_to" value="gif"></td> 
                <td><a href="##" onclick="clickcbk('form#attributes.file_id#','convert_to',1)" style="text-decoration:none;">GIF (Graphic Interchange Format)</a></td> 
                <td><input type="text" size="4" name="convert_width_gif" id="convert_width_gif" value="<cfif qry_detail.detail.orgwidth EQ 0>500<cfelse>#qry_detail.detail.orgwidth#</cfif>" <cfif docalcs>onchange="aspectheight(this,'convert_height_gif','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_width_gif" id="inch_width_gif" <cfif docalcs>onchange="aspectheightin(this,'inch_height_gif','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_gif,inch_width_gif,'convert_height_gif','convert_width_gif',#qry_xmp.yres#,#qry_xmp.xres#);"</cfif> maxlength="4" style="display: none;"> x <input type="text" size="4" name="convert_height_gif" id="convert_height_gif" value="<cfif qry_detail.detail.orgheight EQ 0>500<cfelse>#qry_detail.detail.orgheight#</cfif>" <cfif docalcs>onchange="aspectwidth(this,'convert_width_gif','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_height_gif" id="inch_height_gif" <cfif docalcs>onchange="aspectwidthin(this,'inch_width_gif','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_gif,inch_width_gif,'convert_height_gif','convert_width_gif',#qry_xmp.yres#,#qry_xmp.xres#);"</cfif> maxlength="4" style="display: none;">  
 
                <select name="formatbox_gif" id="formatbox_gif" <cfif docalcs>onchange="changeFormat('form#attributes.file_id#',convert_height_gif,convert_width_gif,'convert_height_gif','convert_width_gif',#qry_xmp.xres#,#qry_xmp.yres#,'inch_height_gif','inch_width_gif','formatbox_gif')"</cfif>> 
                    <option value="pixels">Pixels</option> 
                    <cfif docalcs><option value="inches">Inches</option></cfif> 
                </select> 
 
                or <input type="text" size="4" name="convert_dpi_gif" id="convert_dpi_gif" maxlength="3"> dpi</td> 
                <!--- Watermark ---> 
                <cfif attributes.wmtemplates.recordcount NEQ 0> 
                    <td width="1%" nowrap="true"> 
                        <select name="convert_wm_gif" id="convert_wm_gif"> 
                            <option value="" selected="selected">Apply watermark</option> 
                            <option value="">---</option> 
                            <cfloop query="attributes.wmtemplates"> 
                                <option value="#wm_temp_id#">#wm_name#</option> 
                            </cfloop> 
                        </select> 
                    </td> 
                </cfif> 
            </tr> 
            <tr class="list"> 
                <td><input type="checkbox" name="convert_to" value="png"></td> 
                <td><a href="##" onclick="clickcbk('form#attributes.file_id#','convert_to',2)" style="text-decoration:none;">PNG (Portable (Public) Network Graphic)</a></td> 
                <td><input type="text" size="4" name="convert_width_png" id="convert_width_png" value="<cfif qry_detail.detail.orgwidth EQ 0>500<cfelse>#qry_detail.detail.orgwidth#</cfif>" <cfif docalcs>onchange="aspectheight(this,'convert_height_png','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_width_png" id="inch_width_png" <cfif docalcs>onchange="aspectheightin(this,'inch_height_png','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_png,inch_width_png,'convert_height_png','convert_width_png',#qry_xmp.yres#,#qry_xmp.xres#);"</cfif> maxlength="4" style="display: none;"> x <input type="text" size="4" name="convert_height_png" id="convert_height_png" value="<cfif qry_detail.detail.orgheight EQ 0>500<cfelse>#qry_detail.detail.orgheight#</cfif>" <cfif docalcs>onchange="aspectwidth(this,'convert_width_png','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_height_png" id="inch_height_png" <cfif docalcs>onchange="aspectwidthin(this,'inch_width_png','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_png,inch_width_png,'convert_height_png','convert_width_png',#qry_xmp.yres#,#qry_xmp.xres#);"</cfif> maxlength="4" style="display: none;">  
 
                <select name="formatbox_png" id="formatbox_png" <cfif docalcs>onchange="changeFormat('form#attributes.file_id#',convert_height_png,convert_width_png,'convert_height_png','convert_width_png',#qry_xmp.xres#,#qry_xmp.yres#,'inch_height_png','inch_width_png','formatbox_png')"</cfif>> 
                    <option value="pixels">Pixels</option> 
                    <cfif docalcs><option value="inches">Inches</option></cfif> 
                </select> 
 
                or <input type="text" size="4" name="convert_dpi_png" id="convert_dpi_png" maxlength="3"> dpi</td> 
                <!--- Watermark ---> 
                <cfif attributes.wmtemplates.recordcount NEQ 0> 
                    <td width="1%" nowrap="true"> 
                        <select name="convert_wm_png" id="convert_wm_png"> 
                            <option value="" selected="selected">Apply watermark</option> 
                            <option value="">---</option> 
                            <cfloop query="attributes.wmtemplates"> 
                                <option value="#wm_temp_id#">#wm_name#</option> 
                            </cfloop> 
                        </select> 
                    </td> 
                </cfif> 
            </tr> 
            <tr class="list"> 
                <td><input type="checkbox" name="convert_to" value="tif"></td> 
                <td><a href="##" onclick="clickcbk('form#attributes.file_id#','convert_to',3)" style="text-decoration:none;">TIFF (Tagged Image Format File)</a></td> 
                <td><input type="text" size="4" name="convert_width_tif" id="convert_width_tif" value="<cfif qry_detail.detail.orgwidth EQ 0>500<cfelse>#qry_detail.detail.orgwidth#</cfif>" <cfif docalcs>onchange="aspectheight(this,'convert_height_tif','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_width_tif" id="inch_width_tif" <cfif docalcs>onchange="aspectheightin(this,'inch_height_tif','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_tif,inch_width_tif,'convert_height_tif','convert_width_tif',#qry_xmp.yres#,#qry_xmp.xres#);"</cfif> maxlength="4" style="display: none;"> x <input type="text" size="4" name="convert_height_tif" id="convert_height_tif" value="<cfif qry_detail.detail.orgheight EQ 0>500<cfelse>#qry_detail.detail.orgheight#</cfif>" <cfif docalcs>onchange="aspectwidth(this,'convert_width_tif','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_height_tif" id="inch_height_tif" <cfif docalcs>onchange="aspectwidthin(this,'inch_width_tif','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_tif,inch_width_tif,'convert_height_tif','convert_width_tif',#qry_xmp.yres#,#qry_xmp.xres#);"</cfif> maxlength="4" style="display: none;">  
 
                <select name="formatbox_tif" id="formatbox_tif" <cfif docalcs>onchange="changeFormat('form#attributes.file_id#',convert_height_tif,convert_width_tif,'convert_height_tif','convert_width_tif',#qry_xmp.xres#,#qry_xmp.yres#,'inch_height_tif','inch_width_tif','formatbox_tif')"</cfif>> 
                    <option value="pixels">Pixels</option> 
                    <cfif docalcs><option value="inches">Inches</option></cfif> 
                </select> 
 
                or <input type="text" size="4" name="convert_dpi_tif" id="convert_dpi_tif" maxlength="3"> dpi</td> 
                <!--- Watermark ---> 
                <cfif attributes.wmtemplates.recordcount NEQ 0> 
                    <td width="1%" nowrap="true"> 
                        <select name="convert_wm_tif" id="convert_wm_tif"> 
                            <option value="" selected="selected">Apply watermark</option> 
                            <option value="">---</option> 
                            <cfloop query="attributes.wmtemplates"> 
                                <option value="#wm_temp_id#">#wm_name#</option> 
                            </cfloop> 
                        </select> 
                    </td> 
                </cfif> 
            </tr> 
            <tr class="list"> 
                <td><input type="checkbox" name="convert_to" value="bmp"></td> 
                <td><a href="##" onclick="clickcbk('form#attributes.file_id#','convert_to',4)" style="text-decoration:none;">BMP (Windows OS/2 Bitmap Graphics)</a></td> 
                <td><input type="text" size="4" name="convert_width_bmp" id="convert_width_bmp" value="<cfif qry_detail.detail.orgwidth EQ 0>500<cfelse>#qry_detail.detail.orgwidth#</cfif>" <cfif docalcs>onchange="aspectheight(this,'convert_height_bmp','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_width_bmp" id="inch_width_bmp" <cfif docalcs>onchange="aspectheightin(this,'inch_height_bmp','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_bmp,inch_width_bmp,'convert_height_bmp','convert_width_bmp',#qry_xmp.yres#,#qry_xmp.xres#);"</cfif> maxlength="4" style="display: none;"> x <input type="text" size="4" name="convert_height_bmp" id="convert_height_bmp" value="<cfif qry_detail.detail.orgheight EQ 0>500<cfelse>#qry_detail.detail.orgheight#</cfif>" <cfif docalcs>onchange="aspectwidth(this,'convert_width_bmp','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_height_bmp" id="inch_height_bmp" <cfif docalcs>onchange="aspectwidthin(this,'inch_width_bmp','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_bmp,inch_width_bmp,'convert_height_bmp','convert_width_bmp',#qry_xmp.yres#,#qry_xmp.xres#);"</cfif> maxlength="4" style="display: none;">  
 
                <select name="formatbox_bmp" id="formatbox_bmp" <cfif docalcs>onchange="changeFormat('form#attributes.file_id#',convert_height_bmp,convert_width_bmp,'convert_height_bmp','convert_width_bmp',#qry_xmp.xres#,#qry_xmp.yres#,'inch_height_bmp','inch_width_bmp','formatbox_bmp')"</cfif>> 
                    <option value="pixels">Pixels</option> 
                    <cfif docalcs><option value="inches">Inches</option></cfif> 
                </select> 
 
                or <input type="text" size="4" name="convert_dpi_bmp" id="convert_dpi_bmp" maxlength="3"> dpi</td> 
                <!--- Watermark ---> 
                <cfif attributes.wmtemplates.recordcount NEQ 0> 
                    <td width="1%" nowrap="true"> 
                        <select name="convert_wm_bmp" id="convert_wm_bmp"> 
                            <option value="" selected="selected">Apply watermark</option> 
                            <option value="">---</option> 
                            <cfloop query="attributes.wmtemplates"> 
                                <option value="#wm_temp_id#">#wm_name#</option> 
                            </cfloop> 
                        </select> 
                    </td> 
                </cfif> 
            </tr> 
 
 
 
 
 
 
 
 
 
 
 
<tr class="list"> 
                <td><input type="checkbox" name="convert_to" value="jp2"></td> 
                <td><a href="##" onclick="clickcbk('form#attributes.file_id#','convert_to',5)" style="text-decoration:none;">jp2 (JPEG 2000)</a></td> 
                <td><input type="text" size="4" name="convert_width_jp2" id="convert_width_jp2" value="<cfif qry_detail.detail.orgwidth EQ 0>500<cfelse>#qry_detail.detail.orgwidth#</cfif>" <cfif docalcs>onchange="aspectheight(this,'convert_height_jp2','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_width_jp2" id="inch_width_jp2" <cfif docalcs>onchange="aspectheightin(this,'inch_height_jp2','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_jp2,inch_width_jp2,'convert_height_jp2','convert_width_jp2',#qry_xmp.yres#,#qry_xmp.xres#);"</cfif> maxlength="4" style="display: none;"> x <input type="text" size="4" name="convert_height_jp2" id="convert_height_jp2" value="<cfif qry_detail.detail.orgheight EQ 0>500<cfelse>#qry_detail.detail.orgheight#</cfif>" <cfif docalcs>onchange="aspectwidth(this,'convert_width_jp2','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_height_jp2" id="inch_height_jp2" <cfif docalcs>onchange="aspectwidthin(this,'inch_width_jp2','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_jp2,inch_width_jp2,'convert_height_jp2','convert_width_jp2',#qry_xmp.yres#,#qry_xmp.xres#);"</cfif> maxlength="4" style="display: none;">  
 
                <select name="formatbox_jp2" id="formatbox_jp2" <cfif docalcs>onchange="changeFormat('form#attributes.file_id#',convert_height_jp2,convert_width_jp2,'convert_height_jp2','convert_width_jp2',#qry_xmp.xres#,#qry_xmp.yres#,'inch_height_jp2','inch_width_jp2','formatbox_jp2')"</cfif>> 
                    <option value="pixels">Pixels</option> 
                    <cfif docalcs><option value="inches">Inches</option></cfif> 
                </select> 
 
                or <input type="text" size="4" name="convert_dpi_jp2" id="convert_dpi_jp2" maxlength="3"> dpi</td> 
                <!--- Watermark ---> 
 
<cfdump var="#attributes.wmtemplates.recordcount#"> 
                <cfif attributes.wmtemplates.recordcount NEQ 0> 
         
                    <td width="1%" nowrap="true"> 
                        <select name="convert_wm_jp2" id="convert_wm_jp2"> 
                            <option value="" selected="selected">Apply watermark</option> 
                            <option value="">---</option> 
                            <cfloop query="attributes.wmtemplates"> 
                                <option value="#wm_temp_id#">#wm_name#</option> 
                            </cfloop> 
                        </select> 
                    </td> 
                </cfif> 
            </tr>        
 
 
 
 
 
 
 
 
 
    <tr> 
                <td colspan="4"><input type="button" name="convertbutton" value="#myFusebox.getApplicationData().defaults.trans("convert_button")#" class="button" onclick="convertimages('form#attributes.file_id#');"> <div id="statusconvert" style="padding:10px;color:green;background-color:##FFFFE0;visibility:hidden;"></div><div id="statusconvertdummy"></div></td> 
            </tr> 
 
 
 
 
 
 
 
                             
 
 
 
 
 
 
        </table> 
        <!--- Additional Renditions ---> 
        <cfif cs.tab_additional_renditions> 
            <div class="collapsable"> 
                <a href="##" onclick="$('##moreversions').slideToggle('slow');return false;"><div class="headers">&gt; #myFusebox.getApplicationData().defaults.trans("adiver_header")#</div></a> 
                <div id="moreversions" style="display:none;padding-top:10px;"></div> 
            </div> 
        </cfif> 
    </cfif> 
</cfoutput>

then save the file. Now in the same folder (razuna_tomcat_1_7/tomcat/webapps/razuna/global/host/dam/views/ajaxparts) delete the file “dsp_exist_rendition_images.cfm”, Then in the same directory create the file “dsp_exist_rendition_images.cfm” and paste this in it:


#3
<!---
*
* Copyright (C) 2005-2008 Razuna
*
* This file is part of Razuna - Enterprise Digital Asset Management.
*
* Razuna is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Razuna is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Affero Public License for more details.
*
* You should have received a copy of the GNU Affero Public License
* along with Razuna. If not, see <http://www.gnu.org/licenses/>.
*
* You may restribute this Program with a special exception to the terms
* and conditions of version 3.0 of the AGPL as described in Razuna's
* FLOSS exception. You should have received a copy of the FLOSS exception
* along with Razuna. If not, see <http://www.razuna.com/licenses/>.
*
--->
<cfoutput>
    <!--- Flag to specify whether to run javascript calculations on page or not --->
    <cfset docalcs = true>
    <cftry>
        <cfset theaspectratio = #qry_detail.detail.orgwidth# / #qry_detail.detail.orgheight#>
        <cfcatch type="any">
            <cfset theaspectratio = 0>
        </cfcatch>
    </cftry>
    <cfif qry_detail.detail.orgheight EQ 0 OR theaspectratio EQ 0 OR qry_xmp.xres EQ 0 OR qry_xmp.resunit NEQ "inches">
        <!--- Turn off javascript calculations on page because there is not enough data to support them --->
        <cfset docalcs = false>
    </cfif>
    <form name="form#attributes.file_id#" id="form#attributes.file_id#" method="post" action="#self#"<cfif attributes.folderaccess NEQ "R"> onsubmit="filesubmit();return false;"</cfif>>
    <input type="hidden" name="#theaction#" value="#xfa.save#">
    <input type="hidden" name="langcount" value="#valuelist(qry_langs.lang_id)#">
    <input type="hidden" name="folder_id" value="#qry_detail.detail.folder_id_r#">
    <input type="hidden" name="file_id" id="file_id" value="#attributes.file_id#">
    <input type="hidden" name="img_group_id" id="img_group_id" value="#attributes.img_group_id#">
    <input type="hidden" name="theorgname" id="theorgname" value="#qry_detail.detail.img_filename#">
    <input type="hidden" name="thepath" id="thepath" value="#thisPath#">
    <input type="hidden" name="filenameorg" value="#qry_detail.detail.img_filename_org#">
    <input type="hidden" name="customfields" value="#qry_cf.recordcount#">
    <input type="hidden" name="extension" value="#qry_detail.detail.img_extension#">
    <input type="hidden" name="thumbextension" value="#qry_detail.detail.thumb_extension#">
    <input type="hidden" name="link_kind" id="link_kind" value="#qry_detail.detail.link_kind#">
    <input type="hidden" name="link_path_url" id="link_path_url" value="#qry_detail.detail.link_path_url#">
    <input type="hidden" name="xres" id="xres" value="#qry_xmp.xres#">
    <input type="hidden" name="yres" id="yres" value="#qry_xmp.yres#">
    <input type="hidden" name="resunit" id="resunit" value="#qry_xmp.resunit#">
    <div class="collapsable"><div class="headers">Create New Renditions For Existing Rendition</div></div>
            <br />
            <table border="0" cellpadding="0" cellspacing="0" width="100%" class="grid" id="newren">
                <tr class="list">
                    <td width="1%" nowrap="true"><input type="checkbox" name="convert_to" value="jpg"></td>
                    <td width="1%" nowrap="true"><a href="##" onclick="clickcbk('form#attributes.file_id#','convert_to',0)" style="text-decoration:none;">JPEGRENE (Joint Photographic Experts Group)</a></td>
                    <td width="1%" nowrap="true"><input type="text" size="4" name="convert_width_jpg" id="convert_width_jpg" value="<cfif qry_detail.detail.orgwidth EQ 0>500<cfelse>#qry_detail.detail.orgwidth#</cfif>" <cfif docalcs>onchange="aspectheight(this,'convert_height_jpg','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> 
                <input type="text" size="4" name="inch_width_jpg" id="inch_width_jpg" <cfif docalcs>onchange="aspectheightin(this,'inch_height_jpg','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_jpg,inch_width_jpg,'convert_height_jpg','convert_width_jpg',#qry_xmp.yres#,#qry_xmp.xres#);" </cfif>maxlength="4" style="display: none;"> x <input type="text" size="4" name="convert_height_jpg" id="convert_height_jpg" value="<cfif qry_detail.detail.orgheight EQ 0>500<cfelse>#qry_detail.detail.orgheight#</cfif>" <cfif docalcs>onchange="aspectwidth(this,'convert_width_jpg','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_height_jpg" id="inch_height_jpg" <cfif docalcs>onchange="aspectwidthin(this,'inch_width_jpg','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_jpg,inch_width_jpg,'convert_height_jpg','convert_width_jpg',#qry_xmp.yres#,#qry_xmp.xres#);" </cfif>maxlength="4" style="display: none;">
                <select name="formatbox_jpg" id="formatbox_jpg" <cfif docalcs>onchange="changeFormat('form#attributes.file_id#',convert_height_jpg,convert_width_jpg,'convert_height_jpg','convert_width_jpg',#qry_xmp.xres#,#qry_xmp.yres#,'inch_height_jpg','inch_width_jpg','formatbox_jpg')"</cfif>>
                    <option value="pixels">Pixels</option>
                    <cfif docalcs><option value="inches">Inches</option></cfif>
                </select>
                or <input type="text" size="4" name="convert_dpi_jpg" id="convert_dpi_jpg" maxlength="3"> dpi harkirat
                </td>
                    <!--- Watermark --->
                    <cfif attributes.wmtemplates.recordcount NEQ 0>
                        <td width="1%" nowrap="true">
                            <select name="convert_wm_jpg" id="convert_wm_jpg">
                                <option value="" selected="selected">Apply watermark</option>
                                <option value="">---</option>
                                <cfloop query="attributes.wmtemplates">
                                    <option value="#wm_temp_id#">#wm_name#</option>
                                </cfloop>
                            </select>
                        </td>
                    </cfif>
                    <!--- <td rowspan="6" width="100%" nowrap="true" valign="top" style="padding-left:20px;">
                        <strong>#myFusebox.getApplicationData().defaults.trans("images_original")#</strong>
                        <br />
                        #myFusebox.getApplicationData().defaults.trans("file_name")#: #qry_detail.detail.img_filename#
                        <br />
                        #myFusebox.getApplicationData().defaults.trans("format")#: #ucase(qry_detail.detail.img_extension)#
                        <br />
                        #myFusebox.getApplicationData().defaults.trans("size")#: #qry_detail.detail.orgwidth#x#qry_detail.detail.orgheight# pixel
                        <br />
                        #myFusebox.getApplicationData().defaults.trans("data_size")#: #qry_detail.thesize# MB
                        <br />
                        ColorSpace: <cfif qry_xmp.colorspace EQ "">could not be read properly for this file<cfelse>#qry_xmp.colorspace#</cfif>
                        <br />
                        <cfif qry_xmp.resunit EQ "inches">
                            X Resolution: #qry_xmp.xres# dpi
                            <br />
                            Y Resolution: #qry_xmp.yres# dpi
                            <br />
                            Resolution Unit: #qry_xmp.resunit#
                        </cfif>
                    </td> --->
                </tr>
                <tr class="list">
                    <td><input type="checkbox" name="convert_to" value="gif"></td>
                    <td><a href="##" onclick="clickcbk('form#attributes.file_id#','convert_to',1)" style="text-decoration:none;">GIF (Graphic Interchange Format)</a></td>
                    <td><input type="text" size="4" name="convert_width_gif" id="convert_width_gif" value="<cfif qry_detail.detail.orgwidth EQ 0>500<cfelse>#qry_detail.detail.orgwidth#</cfif>" <cfif docalcs>onchange="aspectheight(this,'convert_height_gif','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_width_gif" id="inch_width_gif" <cfif docalcs>onchange="aspectheightin(this,'inch_height_gif','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_gif,inch_width_gif,'convert_height_gif','convert_width_gif',#qry_xmp.yres#,#qry_xmp.xres#);" </cfif>maxlength="4" style="display: none;"> x <input type="text" size="4" name="convert_height_gif" id="convert_height_gif" value="<cfif qry_detail.detail.orgheight EQ 0>500<cfelse>#qry_detail.detail.orgheight#</cfif>" <cfif docalcs>onchange="aspectwidth(this,'convert_width_gif','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_height_gif" id="inch_height_gif" <cfif docalcs>onchange="aspectwidthin(this,'inch_width_gif','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_gif,inch_width_gif,'convert_height_gif','convert_width_gif',#qry_xmp.yres#,#qry_xmp.xres#);" </cfif>maxlength="4" style="display: none;"> 

                <select name="formatbox_gif" id="formatbox_gif" <cfif docalcs>onchange="changeFormat('form#attributes.file_id#',convert_height_gif,convert_width_gif,'convert_height_gif','convert_width_gif',#qry_xmp.xres#,#qry_xmp.yres#,'inch_height_gif','inch_width_gif','formatbox_gif')"</cfif>>
                    <option value="pixels">Pixels</option>
                    <cfif docalcs><option value="inches">Inches</option></cfif>
                </select>

                or <input type="text" size="4" name="convert_dpi_gif" id="convert_dpi_gif" maxlength="3"> dpi</td>
                    <!--- Watermark --->
                    <cfif attributes.wmtemplates.recordcount NEQ 0>
                        <td width="1%" nowrap="true">
                            <select name="convert_wm_gif" id="convert_wm_gif">
                                <option value="" selected="selected">Apply watermark</option>
                                <option value="">---</option>
                                <cfloop query="attributes.wmtemplates">
                                    <option value="#wm_temp_id#">#wm_name#</option>
                                </cfloop>
                            </select>
                        </td>
                    </cfif>
                </tr>
                <tr class="list">
                    <td><input type="checkbox" name="convert_to" value="png"></td>
                    <td><a href="##" onclick="clickcbk('form#attributes.file_id#','convert_to',2)" style="text-decoration:none;">PNG (Portable (Public) Network Graphic)</a></td>
                    <td><input type="text" size="4" name="convert_width_png" id="convert_width_png" value="<cfif qry_detail.detail.orgwidth EQ 0>500<cfelse>#qry_detail.detail.orgwidth#</cfif>" <cfif docalcs>onchange="aspectheight(this,'convert_height_png','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_width_png" id="inch_width_png" <cfif docalcs>onchange="aspectheightin(this,'inch_height_png','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_png,inch_width_png,'convert_height_png','convert_width_png',#qry_xmp.yres#,#qry_xmp.xres#);" </cfif>maxlength="4" style="display: none;"> x <input type="text" size="4" name="convert_height_png" id="convert_height_png" value="<cfif qry_detail.detail.orgheight EQ 0>500<cfelse>#qry_detail.detail.orgheight#</cfif>" <cfif docalcs>onchange="aspectwidth(this,'convert_width_png','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_height_png" id="inch_height_png" <cfif docalcs>onchange="aspectwidthin(this,'inch_width_png','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_png,inch_width_png,'convert_height_png','convert_width_png',#qry_xmp.yres#,#qry_xmp.xres#);" </cfif>maxlength="4" style="display: none;"> 

                <select name="formatbox_png" id="formatbox_png" <cfif docalcs>onchange="changeFormat('form#attributes.file_id#',convert_height_png,convert_width_png,'convert_height_png','convert_width_png',#qry_xmp.xres#,#qry_xmp.yres#,'inch_height_png','inch_width_png','formatbox_png')"</cfif>>
                    <option value="pixels">Pixels</option>
                    <cfif docalcs><option value="inches">Inches</option></cfif>
                </select>

                or <input type="text" size="4" name="convert_dpi_png" id="convert_dpi_png" maxlength="3"> dpi</td>
                    <!--- Watermark --->
                    <cfif attributes.wmtemplates.recordcount NEQ 0>
                        <td width="1%" nowrap="true">
                            <select name="convert_wm_png" id="convert_wm_png">
                                <option value="" selected="selected">Apply watermark</option>
                                <option value="">---</option>
                                <cfloop query="attributes.wmtemplates">
                                    <option value="#wm_temp_id#">#wm_name#</option>
                                </cfloop>
                            </select>
                        </td>
                    </cfif>
                </tr>
                <tr class="list">
                    <td><input type="checkbox" name="convert_to" value="tif"></td>
                    <td><a href="##" onclick="clickcbk('form#attributes.file_id#','convert_to',3)" style="text-decoration:none;">TIFF (Tagged Image Format File)</a></td>
                    <td><input type="text" size="4" name="convert_width_tif" id="convert_width_tif" value="<cfif qry_detail.detail.orgwidth EQ 0>500<cfelse>#qry_detail.detail.orgwidth#</cfif>" <cfif docalcs>onchange="aspectheight(this,'convert_height_tif','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_width_tif" id="inch_width_tif" <cfif docalcs>onchange="aspectheightin(this,'inch_height_tif','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_tif,inch_width_tif,'convert_height_tif','convert_width_tif',#qry_xmp.yres#,#qry_xmp.xres#);" </cfif>maxlength="4" style="display: none;"> x <input type="text" size="4" name="convert_height_tif" id="convert_height_tif" value="<cfif qry_detail.detail.orgheight EQ 0>500<cfelse>#qry_detail.detail.orgheight#</cfif>" <cfif docalcs>onchange="aspectwidth(this,'convert_width_tif','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_height_tif" id="inch_height_tif" <cfif docalcs>onchange="aspectwidthin(this,'inch_width_tif','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_tif,inch_width_tif,'convert_height_tif','convert_width_tif',#qry_xmp.yres#,#qry_xmp.xres#);" </cfif>maxlength="4" style="display: none;"> 

                <select name="formatbox_tif" id="formatbox_tif" <cfif docalcs>onchange="changeFormat('form#attributes.file_id#',convert_height_tif,convert_width_tif,'convert_height_tif','convert_width_tif',#qry_xmp.xres#,#qry_xmp.yres#,'inch_height_tif','inch_width_tif','formatbox_tif')"</cfif>>
                    <option value="pixels">Pixels</option>
                    <cfif docalcs><option value="inches">Inches</option></cfif>
                </select>

                or <input type="text" size="4" name="convert_dpi_tif" id="convert_dpi_tif" maxlength="3"> dpi</td>
                    <!--- Watermark --->
                    <cfif attributes.wmtemplates.recordcount NEQ 0>
                        <td width="1%" nowrap="true">
                            <select name="convert_wm_tif" id="convert_wm_tif">
                                <option value="" selected="selected">Apply watermark</option>
                                <option value="">---</option>
                                <cfloop query="attributes.wmtemplates">
                                    <option value="#wm_temp_id#">#wm_name#</option>
                                </cfloop>
                            </select>
                        </td>
                    </cfif>
                </tr>
                <tr class="list">
                    <td><input type="checkbox" name="convert_to" value="bmp"></td>
                    <td><a href="##" onclick="clickcbk('form#attributes.file_id#','convert_to',4)" style="text-decoration:none;">BMP (Windows OS/2 Bitmap Graphics)</a></td>
                    <td><input type="text" size="4" name="convert_width_bmp" id="convert_width_bmp" value="<cfif qry_detail.detail.orgwidth EQ 0>500<cfelse>#qry_detail.detail.orgwidth#</cfif>" <cfif docalcs>onchange="aspectheight(this,'convert_height_bmp','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_width_bmp" id="inch_width_bmp" <cfif docalcs>onchange="aspectheightin(this,'inch_height_bmp','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_bmp,inch_width_bmp,'convert_height_bmp','convert_width_bmp',#qry_xmp.yres#,#qry_xmp.xres#);" </cfif>maxlength="4" style="display: none;"> x <input type="text" size="4" name="convert_height_bmp" id="convert_height_bmp" value="<cfif qry_detail.detail.orgheight EQ 0>500<cfelse>#qry_detail.detail.orgheight#</cfif>" <cfif docalcs>onchange="aspectwidth(this,'convert_width_bmp','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_height_bmp" id="inch_height_bmp" <cfif docalcs>onchange="aspectwidthin(this,'inch_width_bmp','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_bmp,inch_width_bmp,'convert_height_bmp','convert_width_bmp',#qry_xmp.yres#,#qry_xmp.xres#);" </cfif>maxlength="4" style="display: none;"> 

                <select name="formatbox_bmp" id="formatbox_bmp" <cfif docalcs>onchange="changeFormat('form#attributes.file_id#',convert_height_bmp,convert_width_bmp,'convert_height_bmp','convert_width_bmp',#qry_xmp.xres#,#qry_xmp.yres#,'inch_height_bmp','inch_width_bmp','formatbox_bmp')"</cfif>>
                    <option value="pixels">Pixels</option>
                    <cfif docalcs><option value="inches">Inches</option></cfif>
                </select>

                or <input type="text" size="4" name="convert_dpi_bmp" id="convert_dpi_bmp" maxlength="3"> dpi</td>
                    <!--- Watermark --->
                    <cfif attributes.wmtemplates.recordcount NEQ 0>
                        <td width="1%" nowrap="true">
                            <select name="convert_wm_bmp" id="convert_wm_bmp">
                                <option value="" selected="selected">Apply watermark</option>
                                <option value="">---</option>
                                <cfloop query="attributes.wmtemplates">
                                    <option value="#wm_temp_id#">#wm_name#</option>
                                </cfloop>
                            </select>
                        </td>
                    </cfif>
                </tr>
                    <tr class="list">
                    <td><input type="checkbox" name="convert_to" value="jp2"></td>
                    <td><a href="##" onclick="clickcbk('form#attributes.file_id#','convert_to',5)" style="text-decoration:none;">JP2(JPEG 2000)</a></td>
                    <td><input type="text" size="4" name="convert_width_jp2" id="convert_width_jp2" value="<cfif qry_detail.detail.orgwidth EQ 0>500<cfelse>#qry_detail.detail.orgwidth#</cfif>" <cfif docalcs>onchange="aspectheight(this,'convert_height_jp2','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_width_jp2" id="inch_width_jp2" <cfif docalcs>onchange="aspectheightin(this,'inch_height_jp2','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_jp2,inch_width_jp2,'convert_height_jp2','convert_width_jp2',#qry_xmp.yres#,#qry_xmp.xres#);" </cfif>maxlength="4" style="display: none;"> x <input type="text" size="4" name="convert_height_jp2" id="convert_height_jp2" value="<cfif qry_detail.detail.orgheight EQ 0>500<cfelse>#qry_detail.detail.orgheight#</cfif>" <cfif docalcs>onchange="aspectwidth(this,'convert_width_jp2','form#attributes.file_id#',#theaspectratio#);" </cfif>maxlength="4"> <input type="text" size="4" name="inch_height_jp2" id="inch_height_jp2" <cfif docalcs>onchange="aspectwidthin(this,'inch_width_jp2','form#attributes.file_id#',#theaspectratio#);updatePixels('form#attributes.file_id#',inch_height_jp2,inch_width_jp2,'convert_height_jp2','convert_width_jp2',#qry_xmp.yres#,#qry_xmp.xres#);" </cfif>maxlength="4" style="display: none;"> 

                <select name="formatbox_jp2" id="formatbox_jp2" <cfif docalcs>onchange="changeFormat('form#attributes.file_id#',convert_height_jp2,convert_width_jp2,'convert_height_jp2','convert_width_jp2',#qry_xmp.xres#,#qry_xmp.yres#,'inch_height_jp2','inch_width_jp2','formatbox_jp2')"</cfif>>
                    <option value="pixels">Pixels</option>
                    <cfif docalcs><option value="inches">Inches</option></cfif>
                </select>

                or <input type="text" size="4" name="convert_dpi_jp2" id="convert_dpi_jp2" maxlength="3"> dpi</td>
                or <input type="text" size="4"> quality(1-100)</td>
                    <!--- Watermark --->
                    <cfif attributes.wmtemplates.recordcount NEQ 0>
                        <td width="1%" nowrap="true">
                            <select name="convert_wm_jp2" id="convert_wm_jp2">
                                <option value="" selected="selected">Apply watermark</option>
                                <option value="">---</option>
                                <cfloop query="attributes.wmtemplates">
                                    <option value="#wm_temp_id#">#wm_name#</option>
                                </cfloop>
                            </select>
                        </td>
                    </cfif>
                </tr>

                <tr>
                    <td colspan="4"><input type="button" name="convertbutton" value="#myFusebox.getApplicationData().defaults.trans("convert_button")#" class="button" onclick="convertexistimgrenditions('form#attributes.file_id#');"> <div id="statusconvertreditions" style="padding:10px;color:green;background-color:##FFFFE0;visibility:hidden;"></div><div id="statusrenditionconvertdummy"></div></td>
                </tr>
            </table>
            </form>
</cfoutput>

#4

Save it, restart your razuna and you are good to go!