EXIF ASP Snippet


Snippet of code that puts the upper-right hand table of camera settings when displaying a picture's "Info":

function DumpPhotoInfo()
// This function is used to display basic info for the photo
{
    // FullPath is a global that contains the filename to the
    // the full size version of the image being displayed
    Image.OpenImageFile(FullPath);

    Response.Write("<table cellpadding=0 cellspacing=0>");

    DL("Make", "Make");
    DL("Model", "Model");
    DL("Software", "Software");
    DL("Focal", "Focal&nbsp;Length");
    DL("ExpProg", "Program");
    DL("ISO", "ISO");
    DL("Flash", "Flash");
    DL("WhiteBal", "White&nbsp;Balance");
    DL("s", "Shutter");
    DL("f", "Aperture");
    DL("ExpBias", "Exposure&nbsp;Bias");
    DL("Focus", "Focus");
    DL("Lens", "Lens");
    DL("Meter", "Meter");
    DL("Sharpness", "Sharpness");
    DL("ImageAdj", "Image&nbsp;Adjust");

    DL("Res", "Resolution");
    DL("Qual", "Compression");
    DL("Date", "Date");

    Response.Write("</table>");
}

function DL(ShortName, Desc)
// Worker for DumpPhotoInfo
{
    var Value;

    Value = Image.GetExif(ShortName);
    if (Value > "") {
        Response.Write("<tr>");

        Response.Write("<td><small>" + Desc + "</small></td>");
        Response.Write("<td width=3></td>
<td><small>");
        Response.Write(Server.HTMLEncode(Value) + 
"</small></td>");

        Response.Write("</tr>");
    }
}

 


Page hits: 8,532