Create image using diagonal lines of varying widths

Hi, sorry if I haven't explained what I need to do correctly, I'm sure the picture will explain better. I know I could use multiple masks stacked on top of each other or some similar method, but I'm looking for something less convoluted and neater. Any ideas?
[IMG]http://i40.tinypic.com/34g6hxh.png[/IMG]

secretsoundz,
The bottom lines in the images seem to end at right angles, whereas the others semm to be cut along the shapes they form, so the latter may very well have been made with Clipping masks.
The right solution may depend on whether you wish to have different or corresponding line endings.

Similar Messages

  • Creating image using swing

    Hi,
    I want to create a image of the data in a tabular format.Can we create image using swing. or i require any other api for it.
    Can any one help me.
    Thanks in advance!!

    1. create a TableModel populated with your data
    2. create a JTable based on that model
    3. get the preferred size of that table
    4. create a BufferedImage of the same size
    5. get the Graphics of that image
    6. set the JTable's size to its preferred size
    7. pass the Graphics object to the table's paint() method
    8. dispose the Graphics object

  • How can I create a NetBoot image using command line tools?

    Is it possible to create a NetBoot image entirely using command line tools?
    (That is, without using the SystemImageUtility)
    If so, are there reasonable instructions posted somewhere?
    I don't believe I can use SystemImageUtility with my current setup,
    but I would be happy to hear how I could:
    I have a set of Xserve clusternodes but without optical drives or video cards.
    One node acts as the head, running DHCP, DNS, OpenDirectory, Xgrid.
    They are wired to a gigabit switch.
    I have a PowerBook connected on the subnet which has ServerAdmin Tools installed.
    I don't think when I run SystemImageUtility on my PowerBook that I can successfully image one of the clusternodes disks over the network.
    I have tried to start one node in target(Firewire) mode, connect it via Firewire
    to the head node, and run hdiutil from the head node to make a complete disk image of the clusternode's drive.
    But a NetBoot image requires the whole nbi file, right?
    Could I then use copy this disk image to my PowerBook and use SystemImageUtility on my PowerBook to create a NetBoot image from it?
    I really have tried to read the PDFs, but I found the section on System Imaging in the Command Line Reference rather unhelpful.
    Thanks for anyones help.
    dmaus
      Mac OS X (10.4.4)  

    To create a NetBoot image, you could just put the cluster node in target mode and attach it to your PowerBook. Then use SIU to create the NetBoot image.
    If you're trying to create a backup image of the disk, use hdiutil, or put in in target mode and create the image with Disk Utility.

  • Is there a way to create an image using UPC lines?

    Is there anyway to create an image by using UPC lines? Maybe a plugin........?

    Good day!
    What do you mean by
    create an image by using UPC lines
    Could you post (a link to) an example?
    Regards,
    Pfaffenbichler

  • Error while creating pool using command line

    I am trying to create connection pool using command line as :
    %JAVA_HOME%\bin\java weblogic.Admin -url %serUrl% -username %serUser% -password %serPwd% CREATE_POOL "XXXXXXXX" url=%DB2Url%,driver=com.ibm.db2.jcc.DB2Driver,testConnsOnReserve=true,testTableName=SYSTABLES,initialCapacity=2,maxCapacity=50,capacityIncrement=2,allowShrinking=true,props=user=%DB2Usr%;password=%DB2Pwd%
    This was working fine in 8.1 ,but when i am using same in 9.2 it gives following error in console:
    ======================================================
    <Feb 2, 2007 9:58:11 AM IST> <Error> <Deployer> <BEA-149265> <Failure occured in
    the execution of deployment request with ID '1170390490712' for task 'weblogic.
    deploy.configChangeTask.0'. Error is: 'weblogic.application.ModuleException: '
    weblogic.application.ModuleException:
    at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:268)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu
    leListenerInvoker.java:93)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl
    oymentCallbackFlow.java:360)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
    river.java:26)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
    loymentCallbackFlow.java:56)
    Truncated. see log file for complete stacktrace
    weblogic.common.resourcepool.ResourceSystemException: Cannot load driver class:
    com.ibm.db2.jcc.DB2Driver
    at weblogic.jdbc.common.internal.JDBCUtil.parseException(JDBCUtil.java:2
    92)
    at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(Connect
    ionEnvFactory.java:77)
    =====================================================
    when i am again trying to start server , its unable to start.
    Anybody have idea why this exception is coming.

    Hi ,
    Please check the FSV (field status variant) for your company code in OBY6 .
    then go to transaction code OB14 --> enter the FSV --> Check if field status group G006(Material account) is maintained there or not.
    if not please maintain it.
    Thanks & Regards
    Anshu

  • Create Image using MDT 2013

    Hi ,
    I am quite new for MDT 2013. I have recently installed MDT 2013 in my Windows Server 2012.
    Now , I do have about 10 physical machine with different hardware specification inside. I have installed Windows 8.1 with all required software in it and now I want to distribute the same image in all 10 another physical machine.
    Can anyone provide me the steps to implement this...
    Do I need to create the image using image x software and then use it as a standard image to be deploy it in rest of the systems..
    Thank you...

    I was getting exact same error.
    here is what I did to fix it.
    You need to do all this in a virtual envinronment.
    1- import Windows 8.1 x64 from the DVD and add it to your listed os in MDT
    2- create standard task sequence and select the OS you imported in step one. you need to add suspend to your TS ( look it up on how to )
    3- For some reason WinPe x64 bit kept giving error during deployment so I used WinPe x86.
    4- import Winpe x86 boot.wim into your WDS if you use Pxe boot or create a boot disk from the ISO and boot your VM from it.
    5- deploy windows 8.1 x64 to your VM ,make sure to select " capture image ".
    make all the necessary changes when windows is installed  and MDT  suspends the deployment, take snapshot of your VM , and then cintinue the deployment to finish the capture.
    6- import the new captured image into MDT
    7- creates new standard TS or modify your existing one to deploy the newly captured image.
    8- update your deployment share and start the deployment of your new image.

  • Best practice about dial-peer creating when using analog lines

    Hi,
    I am trying to find out what is the best practice when creating dial-peer for analog lines on CME, should I use trunk group or create separate dial-peer for each FXO ports? If I use trunk group, is there any advantage ( lesser dial-peer)  or disadvantage?
    Thanks!

    The advantage of trunk groups is that a single dial peer can point to for instance PSTN, rather then multiple dialpeers, with varying preference, each pointing to a separate FXO. Funtionally I can't see much difference. So I guess it also comes down to personal preference.
    =============================
    Please remember to rate useful posts, by clicking on the stars below. 
    =============================

  • Programmatically creating VM from already created image using Java

    Hello.
    I am writing a Java program to create VMs from already created VM images. I was able to create through the web portal.
    I am using the API given here http://msdn.microsoft.com/en-us/library/jj157194.aspx
    The request sent is
    <?xml version="1.0" encoding="UTF-8"?>
    <Deployment xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <Name>mltestdeploy</Name>
    <DeploymentSlot>Production</DeploymentSlot>
    <Label>ZGVwbG95bWVudF9tbHRlc3RkZXBsb3k=</Label>
    <RoleList>
    <Role>
    <RoleName>mltesthost</RoleName>
      <RoleType>PersistentVMRole</RoleType>
    <VMImageName>ml-centos-image</VMImageName>
    </Role>
    </RoleList>
    </Deployment>
    "ml-centos-name" is an existing image with that name and I have used this to create another VM from this image.
    I have already created the required cloud service as required by this API.
    I am getting error 400 with text as "Bad Request". This means some parameter is wrong.
    Any help is very much appreciated.
    -Siva

    Now instead of the VMImageName, I used SourceImageName as given in the example.
    The XML body now looks like
    <Deployment xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <Name>mltestdeploy</Name>
    <DeploymentSlot>Production</DeploymentSlot>
    <Label>ZGVwbG95bWVudF9tbHRlc3RkZXBsb3k=</Label>
    <RoleList>
    <Role>
    <RoleName>mltesthost</RoleName>
    <RoleType>PersistentVMRole</RoleType>
    <ConfigurationSets>
    <ConfigurationSet i:type="LinuxProvisioningConfigurationSet">
    <ConfigurationSetType>LinuxProvisioningConfiguration</ConfigurationSetType>
    <HostName>mltesthost</HostName>
    <UserName>mladmin</UserName>
    <UserPassword>password</UserPassword>
    <DisableSshPasswordAuthentication>false</DisableSshPasswordAuthentication>
    </ConfigurationSet>
    </ConfigurationSets>
    <OSVirtualHardDisk>
    <MediaLink>http://portalvhds7dplkth082kmh.blob.core.windows.net/vhds/1v5wpayu.pwl201404160535060424.vhd</MediaLink>
    <SourceImageName>ml-centos-image</SourceImageName>
    </OSVirtualHardDisk>
    </Role>
    </RoleList>
    </Deployment>
    Even now I get the same 'Bad Request' error.
    Is there any way to find out which element is causing this Bad Request error? Thanks

  • How can I display the length of the yet unfinished line that a user is drawing in the image using the line tool of the IMAQ tool palette.

    Is this really not possible using standard Labview/Vision YI`s?

    Herbert,
    I can't find a way to extract the information you want within the program. However, this information is displayed as part of the IMAQ tool palette while the user is drawing the line. The pallette shows the anchor point, the X and Y offsets, and the line length and angle.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Create images with dynamic width from 3 images each (left/center/right-part)

    Hello,
    i want to employ a script to create images of dynamic width for me. The whole process shall base on different sized sets of images, which contain a left-image, a right-image and a center-image. The desired width for the different cases shall be reached by duplicating the center-image between the two outer images and placing those images next to each other until the image extends to desired width.
    The layers importet into Photoshop shall be importet as smart-layers (which i already solved).
    Has anyone done something similar already and could give me some useful hints on that issue ?
    I have come up to this until now:
    #target Photoshop
    // =========================== Opens a new document and asks for dimensions ============================
    var myLayerset = File.openDialog ("Select the set of images you want to use!", "*.png",true)
    var myName = prompt("How do you want to call the document?"); // askes for document name
    var width =  prompt("Please insert width for the output here!", ""); // askes for desired width
    var height = prompt("Please insert height for the output here!", ""); //askes for desired height
    var docName = myName +".psd"
    var idMk = charIDToTypeID( "Mk  " );
        var desc3 = new ActionDescriptor();
        var idNw = charIDToTypeID( "Nw  " );
            var desc4 = new ActionDescriptor();
            var idNm = charIDToTypeID( "Nm  " );
            desc4.putString( idNm, """Wunschname""" );
            var idMd = charIDToTypeID( "Md  " );
            var idRGBM = charIDToTypeID( "RGBM" );
            desc4.putClass( idMd, idRGBM );
            var idWdth = charIDToTypeID( "Wdth" );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc4.putUnitDouble( idWdth, idRlt, width );
            var idHght = charIDToTypeID( "Hght" );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc4.putUnitDouble( idHght, idRlt, height );
            var idRslt = charIDToTypeID( "Rslt" );
            var idRsl = charIDToTypeID( "#Rsl" );
            desc4.putUnitDouble( idRslt, idRsl, 72.000000 );
            var idpixelScaleFactor = stringIDToTypeID( "pixelScaleFactor" );
            desc4.putDouble( idpixelScaleFactor, 1.000000 );
            var idFl = charIDToTypeID( "Fl  " );
            var idFl = charIDToTypeID( "Fl  " );
            var idTrns = charIDToTypeID( "Trns" );
            desc4.putEnumerated( idFl, idFl, idTrns );
            var idDpth = charIDToTypeID( "Dpth" );
            desc4.putInteger( idDpth, 8 );
            var idprofile = stringIDToTypeID( "profile" );
            desc4.putString( idprofile, """sRGB IEC61966-2.1""" );
        var idDcmn = charIDToTypeID( "Dcmn" );
        desc3.putObject( idNw, idDcmn, desc4 );
    executeAction( idMk, desc3, DialogModes.NO );
    //==============================================save document================================================
    var idsave = charIDToTypeID( "save" );
        var desc4 = new ActionDescriptor();
        var idAs = charIDToTypeID( "As  " );
            var desc5 = new ActionDescriptor();
            var idmaximizeCompatibility = stringIDToTypeID( "maximizeCompatibility" );
            desc5.putBoolean( idmaximizeCompatibility, true );
        var idPhtthree = charIDToTypeID( "Pht3" );
        desc4.putObject( idAs, idPhtthree, desc5 );
        var idIn = charIDToTypeID( "In  " );
        desc4.putPath( idIn, new File( "C:\\Users\\ target folder goes here" + docName ) );
        var idDocI = charIDToTypeID( "DocI" );
        desc4.putInteger( idDocI, 308 );
        var idsaveStage = stringIDToTypeID( "saveStage" );
        var idsaveStageType = stringIDToTypeID( "saveStageType" );
        var idsaveSucceeded = stringIDToTypeID( "saveSucceeded" );
        desc4.putEnumerated( idsaveStage, idsaveStageType, idsaveSucceeded );
    executeAction( idsave, desc4, DialogModes.NO );
    //========================================================================================================
    for (var i = 0; i < myLayerset.length; i++) {
    if (myLayerset[i] instanceof File && myLayerset[i].hidden == false) {
    // ======================================================= opens selected images as smart objects====================
    var idOpn = charIDToTypeID( "Opn " );
        var desc1 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
       desc1.putPath( idnull, myLayerset[i]);
        var idsmartObject = stringIDToTypeID( "smartObject" );
        desc1.putBoolean( idsmartObject, true );
    executeAction( idOpn, desc1, DialogModes.NO );
    //===================================duplicates opened layer into created document========================================
    var idDplc = charIDToTypeID( "Dplc" );
        var desc144 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref135 = new ActionReference();
            var idLyr = charIDToTypeID( "Lyr " );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref135.putEnumerated( idLyr, idOrdn, idTrgt );
        desc144.putReference( idnull, ref135 );
        var idT = charIDToTypeID( "T   " );
            var ref136 = new ActionReference();
            var idDcmn = charIDToTypeID( "Dcmn" );
            ref136.putName( idDcmn, docName); 
        desc144.putReference( idT, ref136 );
        var idVrsn = charIDToTypeID( "Vrsn" );
        desc144.putInteger( idVrsn, 5 );
    executeAction( idDplc, desc144, DialogModes.NO );
    // ======================================================= close tab without saving ==========
    var idCls = charIDToTypeID( "Cls " );
        var desc156 = new ActionDescriptor();
        var idSvng = charIDToTypeID( "Svng" );
        var idYsN = charIDToTypeID( "YsN " );
        var idN = charIDToTypeID( "N   " );
        desc156.putEnumerated( idSvng, idYsN, idN );
    executeAction( idCls, desc156, DialogModes.NO );

    I adapted a Script somewhat, so you may give this a test.
    But it uses the open file so you would have to adapt it further.
    // arranges the selected jpg, tif, psd in line;
    // gutters may be irregular due to rounding effects;
    // thanks to michael l hale and muppet mark;
    // for mac and CS6;
    // 2014, use it at your own risk;
    #target photoshop
    if (app.documents.length == 0) {
              var myDocument = app.documents.add(UnitValue (300, "mm"), UnitValue (50, "mm"), 300, "new", NewDocumentMode.RGB, DocumentFill.TRANSPARENT)
    else {myDocument = app.activeDocument};
    // set to pixels;
    var originalRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var theArray = [0, 0, myDocument.width, myDocument.height];
    // select files;
    if ($.os.search(/windows/i) != -1) {var theFiles = File.openDialog ("please select files", '*.jpg;*.tif;*.pdf;*.psd', true)}
    else {var theFiles = File.openDialog ("please select exactly three files", getFiles, true)};
    // do the arrangement
    if (theFiles) {placeInLines (myDocument, theFiles, theArray)}
    app.preferences.rulerUnits = originalRulerUnits;
    ////// function to place images in lines //////
    function placeInLines (myDocument, theFiles, theArray) {
    theFiles.sort();
    // fit on screen;
    var idslct = charIDToTypeID( "slct" );
    var desc64 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
    var ref44 = new ActionReference();
    var idMn = charIDToTypeID( "Mn  " );
    var idMnIt = charIDToTypeID( "MnIt" );
    var idFtOn = charIDToTypeID( "FtOn" );
    ref44.putEnumerated( idMn, idMnIt, idFtOn );
    desc64.putReference( idnull, ref44 );
    executeAction( idslct, desc64, DialogModes.NO );
    // change pref;
    var originalRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    setToAccelerated();
    app.togglePalettes();
    var check = turnOffRescale ();
    // create the arrangement;
    if (theFiles.length > 0 && theFiles.length == 3) {
    myDocument.activeLayer = myDocument.layers[0];
    // create masked group;
    var theGroup = myDocument.layerSets.add();
    theGroup.name = "arrangement";
    // determine the array’s values;
    var areaWidth = theArray[2] - theArray[0];
    var areaHeight = theArray[3] - theArray[1];
    var theDocResolution = myDocument.resolution;
    var areaRelation = areaHeight / areaWidth;
    // center of placed non-pdf images;
    var centerX = Number(myDocument.width / 2);
    var centerY = Number(myDocument.height / 2);
    // suppress dialogs;
    var theDialogSettings = app.displayDialogs;
    app.displayDialogs = DialogModes.NO;
    var pdfSinglePages = new Array;
    var nonPDFs = new Array;
    var theDimPDFs = new Array;
    var theLength = 0;
    // collect the files’ measurements;
    var theDimensions = new Array;
    var theLengths = new Array;
    // array to collect both files and placed pdf-pages;
    var theseFiles = new Array;
    var theLength = 0;
    // collect the files’ measurements;
    for (var o = 0; o < theFiles.length; o++) {
        var thisFile = theFiles[o];
              theseFiles.push(thisFile);
              var theDim = getDimensions(thisFile);
              theDimensions.push(theDim);
              theRelativeWidth = 100 / theDim[1] * theDim[0];
              theLength = theLength + theRelativeWidth;
    // reset dialogmodes;
    app.displayDialogs = DialogModes.ERROR;
    // if three files;
    if (theseFiles.length == 3) {
    // create the layers;
    var theNumber = 0;
    var theAdded = 0;
    var y = areaHeight / 2;
    // add placed image’s width;
    var thisLineWidth = 0 + theAdded;
    var theLastFactor = Number (Number(myDocument.height) / theDimensions[2][1] * theDimensions[2][2] / theDocResolution * 100);
    var theLastWidth = Math.round(theDimensions[2][0] * theLastFactor / 100 * theDocResolution / theDimensions[2][2]);
    // place the files;
    for (var x = 0; x < 3; x++) {
    var theNumber = x;
    var thisFile = theseFiles[theNumber];
    var theFactor = Number (Number(myDocument.height) / theDimensions[theNumber][1] * theDimensions[theNumber][2] / theDocResolution * 100);
    var theNewWidth = Math.round(theDimensions[theNumber][0] * theFactor / 100 * theDocResolution / theDimensions[theNumber][2]);
    var offsetX = theNewWidth / 2 + thisLineWidth - centerX + theArray[0];
    var offsetY = y - centerY + theArray[1];
    var theLayer = placeScaleFile (thisFile, offsetX, offsetY, theFactor, theFactor);
    myDocument.activeLayer.move(theGroup, ElementPlacement.PLACEATBEGINNING);
    thisLineWidth = thisLineWidth + theNewWidth;
    // duplicate the middle one;
    if (theNumber == 1) {
              while (thisLineWidth < myDocument.width - theLastWidth) {
                        theLayer = duplicateAndOffset (theLayer, theNewWidth, 0);
                        thisLineWidth = thisLineWidth + theNewWidth;
    // reset;
    app.togglePalettes();
    turnOnRescale (check);
    app.preferences.rulerUnits = originalRulerUnits;
    ////// playback to accelerated //////
    function setToAccelerated () {
              var idsetd = charIDToTypeID( "setd" );
              var desc1 = new ActionDescriptor();
              var idnull = charIDToTypeID( "null" );
                        var ref1 = new ActionReference();
                        var idPrpr = charIDToTypeID( "Prpr" );
                        var idPbkO = charIDToTypeID( "PbkO" );
                        ref1.putProperty( idPrpr, idPbkO );
                        var idcapp = charIDToTypeID( "capp" );
                        var idOrdn = charIDToTypeID( "Ordn" );
                        var idTrgt = charIDToTypeID( "Trgt" );
                        ref1.putEnumerated( idcapp, idOrdn, idTrgt );
              desc1.putReference( idnull, ref1 );
              var idT = charIDToTypeID( "T   " );
                        var desc2 = new ActionDescriptor();
                        var idperformance = stringIDToTypeID( "performance" );
                        var idperformance = stringIDToTypeID( "performance" );
                        var idaccelerated = stringIDToTypeID( "accelerated" );
                        desc2.putEnumerated( idperformance, idperformance, idaccelerated );
              var idPbkO = charIDToTypeID( "PbkO" );
              desc1.putObject( idT, idPbkO, desc2 );
              executeAction( idsetd, desc1, DialogModes.NO );
    ////// get psds, tifs and jpgs from files //////
    function getFiles (theFile) {
        if (theFile.name.match(/\.(jpg|tif|psd|pdf|)$/i)) {
            return true
    ////// place //////
    function placeScaleFile (file, xOffset, yOffset, theScale) {
    // =======================================================
    var idPlc = charIDToTypeID( "Plc " );
        var desc5 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
        desc5.putPath( idnull, new File( file ) );
        var idFTcs = charIDToTypeID( "FTcs" );
        var idQCSt = charIDToTypeID( "QCSt" );
        var idQcsa = charIDToTypeID( "Qcsa" );
        desc5.putEnumerated( idFTcs, idQCSt, idQcsa );
        var idOfst = charIDToTypeID( "Ofst" );
            var desc6 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc6.putUnitDouble( idHrzn, idPxl, xOffset );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc6.putUnitDouble( idVrtc, idPxl, yOffset );
        var idOfst = charIDToTypeID( "Ofst" );
        desc5.putObject( idOfst, idOfst, desc6 );
        var idWdth = charIDToTypeID( "Wdth" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc5.putUnitDouble( idWdth, idPrc, theScale );
        var idHght = charIDToTypeID( "Hght" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc5.putUnitDouble( idHght, idPrc, theScale );
        var idLnkd = charIDToTypeID( "Lnkd" );
        desc5.putBoolean( idLnkd, true );
    executeAction( idPlc, desc5, DialogModes.NO );
    return myDocument.activeLayer;
    ////// open pdf //////
    function openPDF (theImage, x) {
    // define pdfopenoptions;
    var pdfOpenOpts = new PDFOpenOptions;
    pdfOpenOpts.antiAlias = true;
    pdfOpenOpts.bitsPerChannel = BitsPerChannelType.EIGHT;
    pdfOpenOpts.cropPage = CropToType.TRIMBOX;
    pdfOpenOpts.mode = OpenDocumentMode.CMYK;
    pdfOpenOpts.resolution = 10;
    pdfOpenOpts.suppressWarnings = true;
    pdfOpenOpts.usePageNumber  = true;
    // suppress dialogs;
    var theDialogSettings = app.displayDialogs;
    app.displayDialogs = DialogModes.NO;
    pdfOpenOpts.page = x;
    var thePdf = app.open(theImage, pdfOpenOpts);
    thePdf.close(SaveOptions.DONOTSAVECHANGES);
    // reset dialogmodes;
    app.displayDialogs = theDialogSettings;
    ////// turn off preference to scale placed image //////
    function turnOffRescale () {
    // determine if the resize prefernce is on;
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    var appDesc = executeActionGet(ref);
    var prefDesc = appDesc.getObjectValue(charIDToTypeID( "GnrP" ));
    var theResizePref = prefDesc.getBoolean(stringIDToTypeID( "resizePastePlace" ));
    // turn off resize image during place;
    if (theResizePref == true);{
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
        var desc12 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref4 = new ActionReference();
            var idPrpr = charIDToTypeID( "Prpr" );
            var idGnrP = charIDToTypeID( "GnrP" );
            ref4.putProperty( idPrpr, idGnrP );
            var idcapp = charIDToTypeID( "capp" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref4.putEnumerated( idcapp, idOrdn, idTrgt );
        desc12.putReference( idnull, ref4 );
        var idT = charIDToTypeID( "T   " );
            var desc13 = new ActionDescriptor();
            var idresizePastePlace = stringIDToTypeID( "resizePastePlace" );
            desc13.putBoolean( idresizePastePlace, false );
        var idGnrP = charIDToTypeID( "GnrP" );
        desc12.putObject( idT, idGnrP, desc13 );
    executeAction( idsetd, desc12, DialogModes.NO );
    return theResizePref
    ////// turn on preference to scale plced image //////
    function turnOnRescale (check) {
    if (check == true) {
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
        var desc14 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref5 = new ActionReference();
            var idPrpr = charIDToTypeID( "Prpr" );
            var idGnrP = charIDToTypeID( "GnrP" );
            ref5.putProperty( idPrpr, idGnrP );
            var idcapp = charIDToTypeID( "capp" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref5.putEnumerated( idcapp, idOrdn, idTrgt );
        desc14.putReference( idnull, ref5 );
        var idT = charIDToTypeID( "T   " );
            var desc15 = new ActionDescriptor();
            var idresizePastePlace = stringIDToTypeID( "resizePastePlace" );
            desc15.putBoolean( idresizePastePlace, true );
        var idGnrP = charIDToTypeID( "GnrP" );
        desc14.putObject( idT, idGnrP, desc15 );
    executeAction( idsetd, desc14, DialogModes.NO );
    ////// convert to so if not one aready //////
    function duplicateAndOffset (theLayer, theXOffset, theYOffset) {
    app.activeDocument.activeLayer = theLayer;
    // =======================================================
    var idcopy = charIDToTypeID( "copy" );
        var desc9 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref5 = new ActionReference();
            var idLyr = charIDToTypeID( "Lyr " );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref5.putEnumerated( idLyr, idOrdn, idTrgt );
        desc9.putReference( idnull, ref5 );
        var idT = charIDToTypeID( "T   " );
            var desc10 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idRlt = charIDToTypeID( "#Pxl" );
            desc10.putUnitDouble( idHrzn, idRlt, theXOffset );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idRlt = charIDToTypeID( "#Pxl" );
            desc10.putUnitDouble( idVrtc, idRlt, theYOffset );
        var idOfst = charIDToTypeID( "Ofst" );
        desc9.putObject( idT, idOfst, desc10 );
    executeAction( idcopy, desc9, DialogModes.NO );
    return app.activeDocument.activeLayer
    ////// load pdf as smart object //////
    function transformLayer (layer, percentage, xOffset, yOffset) {
    app.activeDocument.activeLayer = layer;
    // =======================================================
    var idTrnf = charIDToTypeID( "Trnf" );
        var desc4 = new ActionDescriptor();
        var idFTcs = charIDToTypeID( "FTcs" );
        var idQCSt = charIDToTypeID( "QCSt" );
        var idQcsa = charIDToTypeID( "Qcsa" );
        desc4.putEnumerated( idFTcs, idQCSt, idQcsa );
        var idOfst = charIDToTypeID( "Ofst" );
            var desc5 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc5.putUnitDouble( idHrzn, idPxl, xOffset );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc5.putUnitDouble( idVrtc, idPxl, yOffset );
        var idOfst = charIDToTypeID( "Ofst" );
        desc4.putObject( idOfst, idOfst, desc5 );
        var idWdth = charIDToTypeID( "Wdth" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc4.putUnitDouble( idWdth, idPrc, percentage );
        var idHght = charIDToTypeID( "Hght" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc4.putUnitDouble( idHght, idPrc, percentage );
        var idLnkd = charIDToTypeID( "Lnkd" );
        desc4.putBoolean( idLnkd, true );
        var idAntA = charIDToTypeID( "AntA" );
        desc4.putBoolean( idAntA, true );
    executeAction( idTrnf, desc4, DialogModes.NO );
    return app.activeDocument.activeLayer
    ////// function to get file’s dimensions, thanks to michael l hale //////
    function getDimensions( file ){
    function divideString (theString) {
              theString = String(theString);
        var a = Number(theString.slice(0, theString.indexOf("\/")));
        var b = Number(theString.slice(theString.indexOf("\/") + 1));
        return (a / b)
    // from a script by michael l hale;
    function loadXMPLibrary(){
         if ( !ExternalObject.AdobeXMPScript ){
              try{
                   ExternalObject.AdobeXMPScript = new ExternalObject
                                                                ('lib:AdobeXMPScript');
              }catch (e){
                   alert( ErrStrs.XMPLIB );
                   return false;
         return true;
    function unloadXMPLibrary(){
       if( ExternalObject.AdobeXMPScript ) {
          try{
             ExternalObject.AdobeXMPScript.unload();
             ExternalObject.AdobeXMPScript = undefined;
          }catch (e){
             alert( ErrStrs.XMPLIB );
    ////// based on a script by muppet mark //////
    function dimensionsShellScript (file) {
              try {
    // getMetaDataMDLS;
    if (File(file) instanceof File && File(file).exists) {
              var shellString = "/usr/bin/mdls ";
              shellString += File(file).fsName;
    //          shellString += File(file).fullName;
              shellString += ' > ~/Documents/StdOut2.txt';
              app.system(shellString);
    // read the file;
    if (File('~/Documents/StdOut2.txt').exists == true) {
        var file = File('~/Documents/StdOut2.txt');
        file.open("r");
        file.encoding= 'BINARY';
        var theText = new String;
        for (var m = 0; m < file.length; m ++) {
                        theText = theText.concat(file.readch());
              file.close();
              theText = theText.split("\n");
    // get the dimensions;
              var dim = new Array;
              for (var m = 0; m < theText.length; m++) {
                        var theLine = theText[m];
                        if (theLine.indexOf("kMDItemPixelWidth") != -1) {dim.push(theLine.match(/[\d\.]+/g).join("") )}
                        if (theLine.indexOf("kMDItemPixelHeight") != -1) {dim.push(theLine.match(/[\d\.]+/g).join("") )}
                        if (theLine.indexOf("kMDItemResolutionWidthDPI") != -1) {dim.push(theLine.match(/[\d\.]+/g).join("") )}
                        if (theLine.indexOf("kMDItemResolutionHeightDPI") != -1) {dim.push(theLine.match(/[\d\.]+/g).join("") )}
    // remove file and hand back;
              File('~/Documents/StdOut2.txt').remove();
    catch (e) {
              if (File('~/Documents/StdOut2.txt').exists == true) {File('~/Documents/StdOut2.txt').remove()};
              return dim
              try{
                        loadXMPLibrary();
                        var xmpf = new XMPFile( file.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_READ );
                        var xmp = xmpf.getXMP();
                        xmpf.closeFile();
                        var resolutionUnit = xmp.getProperty( XMPConst.NS_TIFF, 'ResolutionUnit', XMPConst.STRING);
                        var resFactor = 1;
                        if (resolutionUnit == 2) {
                                  var resFactor = 1;
                        if (resolutionUnit == 3) {
                                  var resFactor = 2.54;
                        var dim = [xmp.getProperty( XMPConst.NS_EXIF, 'PixelXDimension', XMPConst.STRING),
                        xmp.getProperty( XMPConst.NS_EXIF, 'PixelYDimension', XMPConst.STRING),
                        divideString (xmp.getProperty( XMPConst.NS_TIFF, 'XResolution', XMPConst.STRING)) * resFactor,
                        divideString (xmp.getProperty( XMPConst.NS_TIFF, 'YResolution', XMPConst.STRING)) * resFactor];
                        unloadXMPLibrary();
                        if(dim[0]=="undefined" || dim[1]=="undefined"){
                var dim = undefined;
                var res = undefined;
                var bt = new BridgeTalk;
                bt.target = "bridge";
                var myScript = ("var ftn = " + psRemote.toSource() + "; ftn("+file.toSource()+");");
                bt.body = myScript;
                bt.onResult = function( inBT ) {myReturnValue(inBT.body); }
                bt.send(10);
                        function myReturnValue(str){
                                  res = str;
                                  dim = str.split(',');
                        function psRemote(file){
                                  var t= new Thumbnail(file);
                                  return t.core.quickMetadata.width+','+t.core.quickMetadata.height;
        }catch(e){unloadXMPLibrary()};
              if (String(dim[2]).indexOf("\/") != -1) {
                        var a = divideString(dim[2]);
                        var b = divideString(dim[3]);
                        dim = [dim[0], dim[1], a, b]
    // if dimensions are missing as might be the case with some bitmap tiffs for example try a shell-script;
              if (dim[0] == undefined || dim[1] == undefined) {
                        var array = dimensionsShellScript(file);
                        dim = array;
    // if shell-string failed open doc to get measurements;
              if (dim[0] == undefined || dim[1] == undefined) {
                        var thisDoc = app.open (File(file));
    // close ai without saving;
                        if (file.name.slice(-3).match(/\.(ai)$/i)) {
                                  thisDoc.trim(TrimType.TRANSPARENT);
                                  var dim = [thisDoc.width, thisDoc.height, thisDoc.resolution, thisDoc.resolution];
                                  thisDoc.close(SaveOptions.DONOTSAVECHANGES)
                        else {
                                  var dim = [thisDoc.width, thisDoc.height, thisDoc.resolution, thisDoc.resolution];
                                  thisDoc.close(SaveOptions.PROMPTTOSAVECHANGES)
    return dim;

  • Image variants width/length scale

    Hi
    This is from the Console Manual:
    Image variants
    Scale
    Should the original image be scaled (Yes/No)?
    Width
    The maximum width of the scaled variant (integer value).
    Height
    The maximum height of the scaled variant (integer value).
    what is the scale measure?
    mm, inch, point etc. ?
    /Kurt
    Update:
    found it in "layouts, default units" = "Inch"
    Edited by: Kurt Jørgensen on Dec 1, 2010 10:50 AM

    If you're talking about the JPEG preview image contained within the files, I think the DNG converter is simply creating a little bit larger preview image.  This does not have any impact on the raw data.

  • HT201528 IDVD version of videos pause momentarily about every ten seconds and diagonal lines are ziggy. Image looks good all the way through the process and even on idvd

    I am trying to make a dvd from a video I shot with a Sony HD avchd camera on a new mac mini running mac os x version 10.7.4
    I'm using an up to date  Imovie but copied IDVD version 7.1.2  and the support libraryt from an up to date macbook.  The video is about 40 minutes long.  It looks beautiful all the way from teh camera to playing it on idvd, but when I play the dvd on a player or in a computer it stops momentariily about every ten seconds and the picture is ziggy on diagonal lines.
    Also, if I try to save the movie as a .mov file there is no audio.
    Can't I move idvd to my new computer?

    Hi
    Why is the picture better all the way to iDVD - then degrades on the DVD
    • DVD is as standard - interlaced SD-Video
    If You need better then only way is via Blu Ray
    • iMovie'08 to 11 - can not deliver this any way known to me to iDVD - first step in the degradation process
    Use iMovie HD6 or FinalCut to do this delivery to 100% of what's possibly
    Jaggy diagonal lines - mostly due to the use of iMovie'08 to 11 as they only deliver every second line in an already limited quality as interlaced SD-Video - taking away 50% doesn't improve a bit
    Jumpy movie -. most often due to feeding iDVD wrong frame rate and forceing it to convert - IT DOES this BADLY. I use JES_Deinterlacer (free on internet) to do this and it does this even better than pay applications.
    iDVD can only deliver 25fps (PAL) or 29.97fps (30fps) (NTSC) - so feeding it
    • 24 i or p
    • 50p or
    • 60p
    Will not improve at all.
    If iMovie'08 to 11 are only option - Then
    • DO NOT - Share to iDVD - as this too degrade the final product
    • I do - Share to Media Browser - and as - LARGE - Not HD or other resolution as this too degrades quality
    More can be said on this - My long note follows - if of interest.
    DVD quality  
    1. iDVD 08, 09 & 11 has three levels of qualities. (version 7.0.1, 7,0.4 & 7.1.1) and iDVD 6 has the two last ones
    • Professional Quality
    (movies + menus up to 120 min.) - BEST (but not always for short movies e.g. up to 45 minutes in total)
    • Best Performances
    (movies + menus  less than 60 min.) - High quality on final DVD (Can be best for short movies)
    • High Quality (in iDVD08 or 09) / Best Quality (in iDVD6)
    (movies + menus up to 120 min.) - slightly lower quality than above
    Menu can take 15 minutes or even more - I use a very simple one with no audio or animation like ”Brushed Metal” in old Themes.
    About double on DL DVDs.
    2. Video from
    • FCE/P - Export out as full quality QuickTime.mov (not self-containing, no conversion)
    • iMovie x-6 - Don't use ”Share/Export to iDVD” = destructive even to movie project and especially so
    when the movie includes photos and the Ken Burns effect NOT is used. Instead just drop or import the iMovie movie project icon (with a Star on it) into iDVD theme window.
    • iMovie’08 or 09 or 11 are not meant to go to iDVD. Go via Media Browser or rather use iMovie HD 6 from start.
    3. I use Roxio Toast™ to make an as slow burn as possibly e.g. x4 or x1 (in iDVD’08 or 09  this can also be set)
    This can also be done with Apple’s Disk Utilities application when burning from a DiskImage.
    4. There has to be about or more than 25Gb free space on internal (start-up) hard disk. iDVD can't
    use an external one as scratch disk (if it is not start-up disc). For SD-Video - if HD-material is used I guess that 4 to 5 times more would do.
    5. I use Verbatim ( also recommended by many - Taiyo Yuden DVDs - I can’t get hold of it to test )
    6. I use DVD-R (no +R or +/-RW) - DVD-R play’s on more and older DVD-Players
    7. Keep NTSC to NTSC - or - PAL to PAL when going from iMovie to iDVD
    (I use JES_Deinterlacer to keep frame per sec. same from editing to the Video-DVD result.)
    8. Don’t burn more than three DVDs at a time - but let the laser cool off for a while before next batch.
    iDVD quality also depends on.
    • DVD is a standard in it self. It is Standard Definition Quality = Same as on old CRT-TV sets and can not
    deliver anything better that this.
    HD-DVD was a short-lived standard and it was only a few Toshiba DVD-players that could playback.
    These DVDs could be made in DVD-Studio Pro. But they don’t playback on any other standard DVD-Player.
    Blu-Ray / BD can be coded onto DVDs but limited in time to - about 20-30 minutes and then need
    _ Roxio Toast™ 10 Pro incl. BD-component
    _ BD disks and burner if full length movies are to be stored
    _ BD-Player or PlayStation3 - to be able to playback
    The BD-encoded DVDs can be play-backed IF Mac also have Roxio DVD-player tool. Not on any standard Mac or DVD-player
    Full BD-disks needs a BD-player (in Mac) as they need blue-laser to be read. No red-laser can do this.
    • HOW much free space is there on Your internal (start-up) hard disk. Go for approx. 25Gb.
    less than 5Gb and Your result will most probably not play.
    • How it was recorded - Tripod vs Handheld Camera. A stable picture will give a much higher quality
    • Audio is most often more critical than picture. Bad audio and with dropouts usually results in a non-viewed movie.
    • Use of Video-editor. iMovie’08 or 09 or 11 are not the tools for DVD-production. They discard every second line resulting in a close to VHS-tape quality.
    iMovie 1 to HD6 and FinalCut any version delivers same quality as Camera record in = 100% to iDVD
    • What kind of movie project You drop into it. MPEG4 seems to be a bad choice.
    other strange formats are .avi, .wmv, .flash etc. Convert to streamingDV first
    Also audio formats matters. I use only .aiff or from miniDV tape Camera 16-bit
    strange formats often problematic are .avi, .wmv, audio from iTunes, .mp3 etc
    Convert to .aiff first and use this in movie project
    • What kind of standard - NTSC movie and NTSC DVD or PAL to PAL - no mix.
    (If You need to change to do a NTSC DVD from PAL material let JES_Deinterlacer_3.2.2 do the conversion)
    (Dropping a PAL movie into a NTSC iDVD project
    (US) NTSC DVDs most often are playable in EU
    (EU) PAL DVDs most often needs to be converted to play in US
    UNLESS. They are play-backed by a Mac - then You need not to care
    • What kind of DVDs You are using. I use Verbatim DVD-R (this brand AND no +R or +/-RW)
    • How You encode and burn it. Two settings prior iDVD’08 or 09
    Pro Quality (only in iDVD 08 & 09)
    Best / High Quality (not always - most often not)
    Best / High Performances (most often my choice before Pro Quality)
    1. go to iDVD pref. menu and select tab far right and set burn speed to x1 (less errors = plays better) - only in iDVD 08 & 09
    (x4 by some and may be even better)
    2. Project info. Select Professional Encoding - only in iDVD 08 & 09.
    Region codes.
    iDVD - only burn Region = 0 - meaning - DVDs are playable everywhere
    DVD Studio pro can set Region codes.
    1 = US
    2 = EU
    unclemano wrote
    What it turned out to be was the "quality" settings in iDVD. The total clip time was NOT over 2 hours or 4.7GB, yet iDVD created massive visual artifacts on the "professional quality" setting.
    I switched the settings to "high quality" which solved the problem. According iDVD help, "high quality" determines the best bit rate for the clips you have.
    I have NEVER seen iDVD do this before, especially when I was under the 2 hour and 4.7GB limits.
    For anyone else, there seem to be 2 places in iDVD to set quality settings, the first is under "preferences" and the second under "project info." They do NOT seem to be linked (i.e. if you change one, the other is NOT changed). take care, Mario
    TO GET IT TO WORK SLIGHTLY FASTER
    • Minimum of 25Gb free space on Start-Up hard disk
    • No other programs running in BackGround e.g. Energy-Saver
    • Don’t let HD spin down or be turned off (in Energy-Save)
    • Move hard disks that are not to be used to Trash - To be disconnected/turned off
    • Goto Spotlight and set the rest of them under Integrity (not to be scanned)
    • Set screen-saver to a folder without any photo - then make an active corner (up right for me) and set
    pointer to this - turns on screen saver - to show that it has nothing to show
    Yours Bengt W

  • Image problems with my 6D...diagonal line

    Hello, my name is Lindy and I'm new to this forum. I've been having a problem with my Canon 6D which results in some of my images appearing with a dark diagonal line across the upper left hand corner. I've seen this problem with both my 100mm L lens and my 16-35mm lens. Has anyone had this problem before or have any idea of what may be wrong?
    Thanks!!
    Solved!
    Go to Solution.

    Hi Lindy.  You've got a bit of "dust" on your sensor (only in your case it looks like a tiny hair).  
    It's easily fixed.
    See page 279 of your owner's manual which describges how to clean the sensor.  
    I do, however, recommend that before doing an automatic cleaning cycle, you remove the lens and point it at the ground -- that way this little hair has someplace to go when it falls... other than finding itself another location inside your camera.
    After cleaning, poing the camera a plain white wall (or ceiling) and snap a photo (it doesn't even have to be in focus).  The dust shows up better at high f-stops (it'll be fuzzier at low f-stops).
    Sometimes automatic cleaning is not enough and you have to do something further.  If that's the case, then see page 283 for "manual sensor cleaning".  This simply causes the camera to power down the sensor, but open the shutter (and hold it open) so that you can inspect and clean it.  If you look inside, what you're REALLY seeing are the two filters in front of the sensor.  The front filter is the one that vibrates (using a piezoelectric effect) to "shake" dust loose.  
    I use a variety of techniques... the simplest and safest is to use a simple hand-squeeze (bulb) blower such as a Giottos Rocket Blower.  I recommend you not use cans of compressed air because the liquid propellant in the cans can spray out if the can is either shaken or not held perfectly level and that leaves a residue on the filter (and the only way to get that off is to wet-clean the filter).  Even air-compressors spray water and oil.  A hand-squeezed blower is the safest option.
    If that doesn't work, I use an extremely soft small paintbrush.  They actually do make brushes that plug in to release any static charge so that if something is sticking because of static cling it will hopefully release.
    If that doesn't work, I use a sensor scope to inspect my sensor and get a better understanding of why it still wont come free (because generally it would have by now) and then wet-clean the sensor using Photographic Solutions brand "Sensor Swabs" and "Eclipse" cleaning solution.  The solution is nearly pure methenol which means it evaporates very quickly and leaves no residue behind.
    My guess is a simple manual cleaning (with camera pointing at the ground) -or- a hand-squeezed blower will likely do the trick.  If you do resort to a brush, give that brush a couple of good solid whacks on the edge of a desk or table to throw off any dust that could be on the brush -- as you don't want to add dust on to the sensor as you are trying to brush that hair away.
    Most "real" camera stores (stores in business primarily to sell and service camera gear -- not big box stores that also happen to sell cameras) offer sensor cleaning, but usually there's a charge associated with that.  It's fairly easy to learn to clean the sensor (which is why Canon has a section in the owner's manual) and it's something photographers have to do.... just occasionally.
    Tim Campbell
    5D II, 5D III, 60Da

  • Create a new Buffered Image using Raster and ColorModel

    Sorry , I crosspost this message,because no one reply.
    Recently,I write a programme combining C++ and Java .
    The C++ part create a array containing image data in form of BI_RGB and biBitCount==32.
    The java part create a image using Raster and ColorModel like this:
       static int[] data ;
       DataBuffer db = new DataBufferInt(data, data.length);
       WritableRaster wr =Raster.createPackedRaster(db, 1024,768, 32, null);
       ColorModel cm = new DirectColorModel(32,0xff0000,0x00ff00,0x0000ff);
       img = new BufferedImage(cm, wr, false, null);But it doesn't work .
    it report this:
    Exception in thread "main" java.lang.IllegalArgumentException: Raster sun.awt.im
    age.SunWritableRaster@dff3a2 is incompatible with ColorModel DirectColorModel: r
    mask=ff0000 gmask=ff00 bmask=ff amask=0
    at java.awt.image.BufferedImage.<init>(BufferedImage.java:549)
    at monitor.test.Perform2.main(Perform2.java:39)

    hey epico
    compiles & runs 4 me
    see javadocs for SinglePixelPackedSampleModel
    import java.awt.image.*;
    public class Tester {
    DataBuffer db;
    WritableRaster wr;
    ColorModel cm;
    BufferedImage im;
    int[] data;
    int[] masks;
    int w = 768;
    int h = 576;
      public Tester() {
        data = new int[768*576];
        for (int i = 0;i < w*h ;i++ ) {
          data[i] = 0;
        masks = new int[3];
        masks[0] = 0xff0000;
        masks[1] = 0x00ff00;
        masks[2] = 0x0000ff;
        db = new DataBufferInt(data,data.length);
        SinglePixelPackedSampleModel sm = new SinglePixelPackedSampleModel(DataBuffer.TYPE_INT,w,h,masks);
        cm = new DirectColorModel(32,0xff0000,0x00ff00,0x0000ff);
        wr = Raster.createWritableRaster(sm,db,null);
        im = new BufferedImage(cm,wr,false,null);
      public static void main(String[] args) {
        Tester tester1 = new Tester();
    }

  • Problem in creating 1 image using differnt images

    Dear Fellows I want to create an image by using different images in byte array format. Images may be transparent or normal images. I want final result in byte array. I am using the following technique which is working fine but the problem with this technique is that it takes too much time to create an image. This is because I am using MediaTraker. If I delete the code of MediaTracker then program have undeterministic behavior i.e, sometimes it create the final image properly and sometimes nothing is displayed in final image.
    I need some help from you. If anyone of you know the technique to draw image using different images without using mediaTracker kindly let me know.
    Early replies will be appreciated
    // here is the sample code which i m using for creating image
    byte[] backgroundImage= // read 800 X 600 image from disk and convert it in to byte array
    byte[] image1 = // read 200 X 200 image from disk and convert it in to byte array
    byte[] transparentImage // read 300 X 300 transparent image from disk and convert it in to byte array
    Image img=null;
    Frame frame =new Frame();
    frame.addNotify();
    //creating BufferedImage object to store Final image
    BufferedImage requiredImage= new BufferedImage(800,600,BufferedImage.SCALE_SMOOTH);
    //get Graphics of BufferedImage created above
    Graphics2D g=(Graphics2D) requiredImage.getGraphics();
    ///// begin draw back ground image
    img=Toolkit.getDefaultToolkit().createImage(backgroundImage);
    try
    MediaTracker mt = new MediaTracker(frame);
    mt.addImage(img, 0); // adds image with ID 0
    mt.waitForID(0);
    }catch(Exception myex)
    myex.printStackTrace();
    //draw background starting from x=0, y=0 with 800 X 600 dimentions
    g.drawImage(img,0,0,800,600,null);
    ////////// end draw background image
    ////////// begin draw image1
    img=Toolkit.getDefaultToolkit().createImage(image1);
    try
    MediaTracker mt = new MediaTracker(frame);
    mt.addImage(img, 0); // adds image with ID 0
    mt.waitForID(0);
    }catch(Exception myex)
    myex.printStackTrace();
    //draw image1 starting from x=10, y=10 with 200 X 200 dimentions
    g.drawImage(img,10,10,200,200,null);
    //////////// end draw image1
    //////begin transparentImage
    img=Toolkit.getDefaultToolkit().createImage(backData);
    try
    MediaTracker mt = new MediaTracker(frame);
    mt.addImage(img, 0); // adds image with ID 0
    mt.waitForID(0);
    }catch(Exception myex)
    myex.printStackTrace();
    //draw transparentImage starting from x=400, y=0 with 300 X 300 dimentions
    g.drawImage(img,400,0,300,300,null);
    ///end draw transparent image
    byte []finalResult = //convert requiredImage into byte array;
    you can mail me the solution on my email address [email protected]
    thanks with best regards
    and waiting for someone to reply
    kamran zameer

    is there anyone on this forum to help me??????
    regards,
    kamran zameer

Maybe you are looking for

  • Can't get optical audio to work

    I know this might be an issue with my A/V receiver, but I'm really stuck and frustrated and hoping someone can help. I've got the Apple TV connected direct to the TV since the receiver (A Denon AVR-688) doesn't support audio playback through to the s

  • ORA-06502 (character string buffer too small) on import application via script

    Running apex 4.2.2.00.11 oracle 10.2.0.5 I'm using a script to import my development application to a few production applications. It worked great on apex 4.1.1, but now I get an 'ORA-06502 PL/SQL numeric of value error: character string buffer too s

  • Cant figure it out..........JOINs

    If i omit those lines in script that are bold the query work as i need it, takes less under 3 minutes............. but as soon as i include those lines, it takes hours and no result......... I tested those conditions on it's on without other joins an

  • SSRS - Drillthrough from one tablix to another

    Experts, I am working on an SSRS report with 2 tablixes(tables) with different data sets and having different columns. E.g - When user selects ONLY Param1 then all other parameters are defaulted and 1st tablix shows up. Now, if he selects Param1,Para

  • Current Month Capacity Availability in Capacity Data View

    Capacity Data View Does Not Roll Forward - current month still shows full monthly capacity being available (744 hours for January 2008) even though we are on 01/11/2008 (504 hours left in January 2008).  Where in the configuration this value is calcu