Preserve Resolution while scaling?

Smart-Object layers are ruining the quality of my work when scaling up.
I create 16-bit style animation where you can see the pixel jagged edges (think Street Fighter 2 look) using Photoshop.  One of the cool tricks I learned was that rather than working at full resolution (1920 X 1080), was that I could work at 1/10th the size and do it in 1/10 the time.
That's because when working at full size, I have to use the grid feature and paint in each grid box to mimic a zoomed in pixel.
But working small, I simply use the pencil tool at 1px, and scale up using Nearest Neighbor, which preserves the hard edges.  A brilliant time saving feature which allows me to focus on drawing the whole picture and not on filling in boxes, which is tedious at best.
The problem occurs when I work in CS4's animation timeline mode when I try to convert Image Size.
Normal layers preserve their hard edges when using the Nearest Neighbor method of re-sampling.  Yet video layers must be converted to smart object layers in order to be resized.  Regardless of whether I convert it to a smart object layer during the resizing process (which it does after a warning pop-up) or before I resize, the smart-object/video-layers appear fuzzy while the normal layers preserve their original hard-edge quality.
Why is that and is there a work around?  I'd hate to have to re-animate everything using the tedious gridding technique.
Thanks!

Thanks for the feedback.  I'll give it a shot and even try scaling each frame up as a normal frame and then copy/pasting into the upscaled version.
And After Effects is great for tweening animation, but not so much for traditional/cartoon animation.
Something like this requires drawing each new frame, and Flash is limited by the "vector look" :
http://vimeo.com/11315189 (made entirely in Photoshop by Kris Anka)
Photoshop should definitely consider enlisting the Flash team to better it's timeline abilities as well as fixing this basic issue of upscaling video layers (by not treating it like a video layer and instead looking at it like normal layers viewed with a time dimension).
Thanks again!

Similar Messages

  • Error While scaling out Domain

    Hi,
    I have a OBIEE 11.1.1.7 installed on a machine, i wanted to scale this out, so ran the installer in Scale out BI mode.While Scaling out the configurations and scaling out domain i am getting the below error.
    Any suggestion of how to get rid of this and proceed.My admin server and Bi server are up and running and there is no network disonnection.
    oracle.bi.management.wlsprovision.ScaleOutException: Unexpected error attempting to get pack file content: No message was received for: '800' seconds
      at oracle.bi.management.wlsprovision.scaleout.AdminServerProxyImpl._getNextChunk(AdminServerProxyImpl.java:703)
      at oracle.bi.management.wlsprovision.scaleout.AdminServerProxyImpl.getPackFile(AdminServerProxyImpl.java:198)
      at oracle.bi.management.wlsprovision.scaleout.ScaleOutProcessorImpl.scaleOut(ScaleOutProcessorImpl.java:144)
      at oracle.as.install.bi.biconfig.standard.BIExtendDomainTask.doExecute(BIExtendDomainTask.java:35)
      at oracle.as.install.bi.biconfig.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:70)
      at oracle.as.install.bi.biconfig.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:66)
      at oracle.as.install.bi.biconfig.BIConfigMain.doExecute(BIConfigMain.java:113)
      at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:375)
      at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:88)
      at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:105)
      at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
      at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:96)
      at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:186)
      at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
      at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:86)
      at java.lang.Thread.run(Thread.java:662)
    Caused by: weblogic.rjvm.PeerGoneException: No message was received for: '800' seconds
      at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
      at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
      at javax.management.remote.rmi.RMIConnectionImpl_1035_WLStub.invoke(Unknown Source)
      at weblogic.management.remote.common.RMIConnectionWrapper$16.run(ClientProviderBase.java:919)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
      at weblogic.security.Security.runAs(Security.java:61)
      at weblogic.management.remote.common.RMIConnectionWrapper.invoke(ClientProviderBase.java:917)
      at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:993)
      at oracle.bi.management.wlsprovision.scaleout.AdminServerProxyImpl._getNextChunk(AdminServerProxyImpl.java:693)
      ... 15 more
    Thanks

    AM using the Sun JDK...and I am manipulating around the below settings in the setDomainEnv file
    set XMS_SUN_64BIT=256
    set XMS_SUN_32BIT=256
    set XMX_SUN_64BIT=512
    set XMX_SUN_32BIT=512
    set XMS_JROCKIT_64BIT=256
    set XMS_JROCKIT_32BIT=256
    set XMX_JROCKIT_64BIT=512
    set XMX_JROCKIT_32BIT=512
    if "%JAVA_VENDOR%"=="Sun" (
         set WLS_MEM_ARGS_64BIT=-Xms256m -Xmx512m
         set WLS_MEM_ARGS_32BIT=-Xms256m -Xmx512m
    ) else (
         set WLS_MEM_ARGS_64BIT=-Xms512m -Xmx512m
         set WLS_MEM_ARGS_32BIT=-Xms512m -Xmx512m
    )

  • RDP resolution and scaling level issues between two Win8.1 systems

    I'm trying to follow along with this blog post that describes RDB 8.1 resolution and scaling level updates:
    http://blogs.msdn.com/b/rds/archive/2013/12/16/resolution-and-scaling-level-updates-in-rdp-8-1.aspx
    I'm connecting from one Win8.1 Pro system to another and the scaling level control on the Display control panel, I'm getting an error message that says "The
    display settings can't be changed from a remote session". Both copies of Win8.1 are Pro editions and have had all updates installed.
    Shouldn't my install mean I've got RDB 8.1 with the latest video drivers and that I should
    be able to make these changes? Thanks.

    Hi Chris,
    To verify, if you open a dialog on the remote system, for example, System Properties, and open the same locally and place them side by side, are they the same size, fonts, etc?
    I need to do some testing to verify that auto scaling is not limited to Enterprise SKU.  If we do not get it solved in the next day or so then I may want you to do a screen share and show me what is happening so that I can investigate further.
    -TP

  • Preserving alpha while converting images to grayscale

    I am trying to convert images into grayscale.
    I use this code
    public static BufferedImage grayScale(BufferedImage im) {
            BufferedImage image = new BufferedImage(im.getWidth(), im.getHeight(), BufferedImage.TYPE_BYTE_GRAY);
            Graphics g = image.getGraphics();
            g.drawImage(im, 0, 0, null);
            g.dispose();
            return image;
        }but transparent parts become black. Is there a simple way to preserve opacity while converting to grayscale.

    Since you want to preserve the alpha channel you'll need to get and set the pixels yourself. And you'll have to use a BufferedImage type that
    supports an alpha channel. TYPE_BYTE_GRAY won't do...
    public static BufferedImage grayScale(BufferedImage im) {
         BufferedImage grayImage = new BufferedImage(im.getWidth(), im.getHeith(), BufferedImage.TYPE_INT_ARGB);
         for(int x = 0; x < im.getWidth(); x++)
              for(int y = 0; y < im.getHeight(); y++){
                   int argb = im.getRGB(x,y);
                   int a = (argb >> 24) & 0xff;
                   int r = (argb >> 16) & 0xff;
                   int g = (argb >>  8) & 0xff;
                   int b = (argb      ) & 0xff;
                   int l= (int) (.299 * r + .587 * g + .114 * b) //luminance
                   grayImage.setRGB(x,y, (a << 24) + (l << 16) + (l << 8) + l);
         return grayImage;
    }

  • ATV resolution and scaling

    I'm a little confused about resolution and scaling. Currently I run my ATV through a projector which has a native resolution of 1280x720. As this exactly matches the ATV, I get a lovely picture.
    I'm thinking of changing my projector for a plasma TV. Many plasma TVs are coming out in 1080i, which I think is more than I need as I will only be using it for ATV and as a 2nd monitor for my MBP. I'm also concerned about loss of image quality due to the upscaling from 720p. I'd rather get a TV that is 720p native, like my projector. However, this doesn't seem to be so simple. I've looked at a few TVs which claim to be 720p, yet all of them have a resolution of 1024x768. I understand there may be some around which are 1280x720, but all the ones within my budget seem to be 1024x768.
    I would like to know how this different resolution is likely to affect my picture quality with ATV. I can see that 48 pixels can easily be lopped off to match 720, but what about the horizontal? Surely 1280 cannot be easily converted into 1024, at least not without a detrimental effect on picture quality?

    the_beev wrote:
    I'm a little confused about resolution and scaling. Currently I run my ATV through a projector which has a native resolution of 1280x720. As this exactly matches the ATV, I get a lovely picture.
    I'm thinking of changing my projector for a plasma TV. Many plasma TVs are coming out in 1080i, which I think is more than I need as I will only be using it for ATV and as a 2nd monitor for my MBP. I'm also concerned about loss of image quality due to the upscaling from 720p. I'd rather get a TV that is 720p native, like my projector. However, this doesn't seem to be so simple. I've looked at a few TVs which claim to be 720p, yet all of them have a resolution of 1024x768. I understand there may be some around which are 1280x720, but all the ones within my budget seem to be 1024x768.
    I have an older Panasonic with a 1024x576 panel it's HD ready and accepts up to 1080p signals. I have a newer full 1080p Panasonic full 1920x1080 panel.
    Guess which I prefer?
    The older one has picture quality that blows the other out of the water, but the main reason is I mainly watch SD stuff - I don't have an awful lot of commercial HD stuff though.
    There's something about the old panel though that just looks smoother and more natural - probably a case of mature 1024x576 technology vs early 1080p technology, and poor upscaling of SD content.
    I would like to know how this different resolution is likely to affect my picture quality with ATV. I can see that 48 pixels can easily be lopped off to match 720, but what about the horizontal? Surely 1280 cannot be easily converted into 1024, at least not without a detrimental effect on picture quality?
    Don't worry about 'lopping off pixels', the 1024x576 panels are still 16:9 aspect ratio due to non-square pixel arrangements and scaling works very well with AppleTv 720p IMO.
    So in some ways it may depend on what you're mainly watching, SD or HD - AppleTV should be fine with a 1024x576 panel. In general for plasmas/LCDs SD upscales quite poorly unless the sets have very good upscalers, so if you watch a lot of SD, a full HD set may give a worse subjective experience.
    AC
    Message was edited by: Alley_Cat

  • Losing Resolution While Compressing...

    I have an HDV 1080i 30F sequence that I exported out of FCP as a QuickTime file. I am trying to compress it down pretty small (probably needs to be less than 100MB) for the web. I tried making it into an iPod video and that made it look HORRIBLE.
    Why did that happen? I figured scaling it down it would keep the image sharp? What should I do to compress this video down small enough for the web?

    svalkar13 wrote:
    Image size reads as 68.7m and dimensions read as 4000 px x 6000 px  on all
    three (RAW, PS edit and LR edit).  So does that mean I don't have a problem?    
    Correct, you don't have a problem.
    Any idea why the size (in inches) come up so differently between the PS
    file and the LR file?  In my limited experience I'd been told that the
    measurements listed within "image size" indicated the maximum size you
    could print while maintaining quality.
    Because again, it's a difference in the resolution tag. The tag uses the total number of pixels to provide a 'size'. Digital images don't have a size other than the space they take up on a drive.
    Exampe: you have 1000 pixels. If the tag was set for 100, the 'size' would be 10 inches. You take 100 pixels of your total 1000 pixels and divide that up, you get of course, 10". If the tag were instead 1000, you'd have a 'size' of one inch. Same data. Same number of pixels. IF you want LR and Photoshop to be in sync, just ensure that the value for 'resolution' is the same. But again, it's rather meaningless until you decide how to output those pixels to a print size. Do you want 1 inch or 10 inches from your 1000 pixels?
    see: http://www.digitaldog.net/files/Resolution.pdf

  • GDM does not allow resolution while Gnome does

    My xorg.conf is set to default resolution 1024x768, and when I get into gnome I have 1152x864 set up and it works fine. If I set my default xorg.conf resolution to 1152x864 like my gnome, GDM isn't displayed and I have to login blindly. This would not be a problem except I want to run openbox in 1152x864 which uses the default xorg.conf resolution.
    I'm using the proprietary ati drivers with my radeon x800. Any ideas?
    Last edited by Statix (2008-03-12 00:35:42)

    Ok, I investigated problem a bit.
    I have GDM configured with autologin, what was working for me for a while and now it stopped. Here's the output of stystemctl status gdm.service:
    gdm.service - GNOME Display Manager
    Loaded: loaded (/usr/lib/systemd/system/gdm.service; enabled)
    Active: active (running) since Wed, 2012-11-07 23:44:17 CET; 4min 9s ago
    Main PID: 393 (gdm-binary)
    CGroup: name=systemd:/system/gdm.service
    ├ 393 /usr/sbin/gdm-binary
    ├ 404 /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/DisplayManager/Displays/_0
    └ 407 /usr/bin/Xorg :0 -background none -verbose -auth /var/run/gdm/auth-for-gdm-yT4wmE/database -seat seat0 -nolisten tcp vt1
    Nov 07 23:44:17 localhost systemd[1]: Starting GNOME Display Manager...
    Nov 07 23:44:17 localhost systemd[1]: Started GNOME Display Manager.
    Nov 07 23:44:19 localhost gdm-simple-slave[404]: WARNING: Failed to give slave programs access to the display. Trying to proceed.
    Nov 07 23:44:19 localhost gdm-autologin][417]: gkr-pam: no password is available for user
    I tried removed autologin from /etc/gdm/custom.conf and rebooted system. GDM showed up, but it was not allowing me to login always failing with message, that authentication failed.
    Any idea how to deal with this issue?

  • Preserve CDATA while parsing

    Hi all!
    I receive an XML string that contains a CDATASection with a complete XML-Structure inside.
    What do I have to do to preserve that CDATASection in the XML tree I build out of it to avoid output-escaping on other parsing actions?
    At the moment the program produces the following output:
    NodeName: RootTag
    NodeName: LevelOne
    Text: <?xml version="1.0" encoding="UTF-8"?><InsideRootTag><InsideValueOne>3</InsideValueOne></InsideRootTag>
    import java.io.StringReader;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.stream.StreamSource;
    import org.w3c.dom.CDATASection;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.Text;
    * ToDo: Dokumentation
    * @author CPA
    * @created 16.03.2006
    * @version $Revision$
    public class CDataTransformerTest2 {
      public CDataTransformerTest2() {
      private void transform() {
        String rawData = "<RootTag><LevelOne><![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
                         "<InsideRootTag><InsideValueOne>3</InsideValueOne></InsideRootTag>]]></LevelOne></RootTag>";
        try {
          TransformerFactory tFactory    = TransformerFactory.newInstance();
          Transformer        transformer = tFactory.newTransformer();
          StringReader       reader      = new StringReader(rawData);
          DOMResult          result      = new DOMResult();
          transformer.transform(new StreamSource(reader), result);
          dumpNodeContent(result.getNode().getFirstChild());
        } catch (Exception ex) {
          ex.printStackTrace();
      private void dumpNodeContent(Node inNode) {
        while (inNode != null) {
          if (inNode instanceof Element) {
            System.out.println("NodeName: " + inNode.getNodeName());
            dumpNodeContent(inNode.getFirstChild());
          } else if (inNode instanceof CDATASection) {
            System.out.println("CData: " + inNode.getNodeValue());
          } else if (inNode instanceof Text) {
            System.out.println("Text: " + inNode.getNodeValue());
          inNode = inNode.getNextSibling();
      public static void main(String[] args) {
        CDataTransformerTest2 instance = new CDataTransformerTest2();
        instance.transform();

    Hi Shabarish,
            Thanks for your prompt reply. I've already checked with that. However, below is my code for your reference.
    MappingTrace trace;
    trace = container.getTrace();
    String m = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
    "<ns0:ZSCE_RFC_LOOKUP" +
    " xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"><TANUM>" + a +
    "</TANUM><VSOLA>" + b + 
    "</VSOLA></ns0:ZSCE_RFC_LOOKUP>" ;
    RfcAccessor accessor = null;
    ByteArrayOutputStream out = null;
    InputStream in = null;
    try
    Channel channel = LookupService.getChannel("BS_RFC_Lookup","CC_RFC_RCVR");
    accessor = LookupService.getRfcAccessor(channel);
    InputStream inputStream = new ByteArrayInputStream(m.getBytes());
    XmlPayload payload = LookupService.getXmlPayload(inputStream);
    Payload result = accessor.call(payload);
    in = result.getContent();
    }catch(LookupException e)
    trace.addWarning("Error while lookup " + e.getMessage() );
    String txt = "";
            InputStreamReader inR = new InputStreamReader(in);
            BufferedReader buf = new BufferedReader(inR);
            String line;
          while ( ( line = buf.readLine() ) != null )
                 txt = txt + line;
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = null;
    factory.setNamespaceAware(false);
    factory.setValidating(false);
    Document docRsp = null;
    try {
            docRsp = builder.parse(in);
          } catch (Exception e) {
                         trace.addWarning("Error when parsing RFC Response1 - " + e.getMessage());                                   return null;
    //trace.addInfo("RFC Response XML: " + docRsp.toString());
    if (accessor!=null) {
    try {
    accessor.close();
    } catch (LookupException e) {
    trace.addWarning("Error while closing accessor " + e.getMessage() );
    return txt;
    Thanks,
    Joe.

  • Resolution for scaled up apps in ios 8

    I just received my iphone 6 this morning :-)
    As I got everything setup I am noticing that the 3rd party apps that are getting scaled up due to the bigger screen size look really bad and feel low resolution due to this
    I recall during the setup there was a question if I wanted to enable a zoom mode and not sure if this is a result of that selection. However I cannot find that option anymore.
    Any ideas? Do we have any option other than waiting for the 3rd party developers to retune the apps to the new screen size.

    No sorry, What about using Zoom instead? Settings > General > Accessibility
    Be sure to read how to use it or you'll be back asking how to get out of it :-)
    https://www.apple.com/accessibility/ios/#vision

  • Azure Cloud Service internal server error (500) while scaling up

    I experienced multiple times that scaling up a Cloud Service from 1 (small) instance to 2 (small) instances causes a few minutes of downtime with request returning a an error 500. Is this how it's supposed to work?

    Thanks for the reply!
    Every initialization code is in OnStart() and in case of .cmd scripts, in <Startup> <Task>s inside the service definition... So I suppose until that is run to completion the Azure load balancer shouldn't dispatch any requests to the new instance.
    I tested today everything again, this time with Windows Server 2012 R2 (the Cloud Service didn't use R2 before). The issue is the same:
    Scaling up the service to two instance.
    Second instance is being deployed and starts.
    Requests going to the first instance work (i.e. since clients stick to their instance users who visited the site before the scale-up will continue to be serve through the first instance, hence not noticing anything). Requests going to the second instance
    don't work (internal server error), but the main issue is that requests start to go to the second instance before it is fully initialized!
    (I.e. Azure Management Portal says the role is starting, but still, I can manage to get my request to it, thus I suppose the load balancer does dispatch requests while the role is not fully started yet.)
    Failed request tracing doesn't show anything related (it started to trace after the role got full initialized, but requests reached the instance before this). I can clearly see from the event logs that the ARR installation (run as a startup task) ended after
    the first requests could reach it.
    To summarize, when scaling up the following happens with the second, initializing instance:
    The instance's state is correctly shown on the Management Portal and it's busy, starting.
    The instance still gets requests before it gets fully started.
    After the instance is fully started everything works normally.
    Is this normal?

  • Adaptive Resolution while adjusting mask path

    This is something that has been driving me crazy for a while. Whenever I adjust a mask path, the resolution of the preview window drops to 1/2 and displays the words "Adaptive Resolution (1/2)" appear in the top right corner of the preview window.
    This make it really difficult to make precise adjustments. Is there a way to prevent resolution loss when adjusting mask paths? I've tried, to no avail, changing the Adaptive Resolution settings in the Preferences panel.
    Much thanks,
    Daniel

    In the Composition Panel select OFF (final quality) under the fast preview options.

  • How to preserve customizations while apply patches

    Good day,
    Please how do you go about preserving your customizations while applying patches.
    Thanks

    If you are forced to customize a standard oracle object, register it in $APPL_TOP/admin/applcust.txt. Then you will get a warning while applying patches if your customized objects that have been registered in applcust.txt are going to be overwritten. Then you need to obtain the newly delivered version of the object and reapply your customization to it. If you do this in you development instance, you can reapply your customization in development, and migrate it to test and production right after applying the patch there.

  • Pixel perfect transformable vector shapes that keep their borders while scaling..?

    What is the best approach to creating a vector rectangle that could have a gradient fill and a solid border of, say, 3 pixels and this shape could be animated (seperately for W and H) while no anti-aliasing or warping of the border would occur?
    Is it best to start with a AI shape or a native AE shape?
    I have noticed that both AE and AI can have faded borders, there are semi transparent pixels on the edge of the border so it is not a clean 3 pixel solid. I have also noticed that its difficult to create an extact width and height even while taking the border into account.
    I can't calculate it to the pixel like I would in CSS. So is there any working method to create extact pixels for AE?
    Thanks

    As I re-read your qustion I thought you might be asking how to scale a shape layer with a stroke but keep the stroke the same size visually so that a shape layer with a stroke of 10 pixels would still have a stroke of ten pixels when scaled to 200%. If that is what you want then add this expression to the stroke with and scale the shape layer with the transform>scale property.
    sf = transform.scale[0] / 100;
    sv = value;
    sv / sf

  • Can I restore resolution after scaling down?

    I created a scene for an animation by painting in photoshop meant for HDTV 1080p. I scaled the image down in order to create a longer panel for a tracking shot, but now when I scale it back up to the correct size the resolution is terrible! Is there any way to restore the resolution? I was told I should have made it a smart object before resizing, but is there any way to fix the problem after the fact?

    Assuming your painting is made of pixels (vs. shapes), other than going back in your History (assuming you're in the same Photoshop session), no.  Once you've downsampled pixels, there's no getting the lost detail back.
    Some thoughts:
    Close the document without saving and reopen the original.
    If you've already overwritten your master document, look for a backup of the file.
    -Noel

  • How to retain the same resolution while croping a tiff image using jai api

    Hi all,
    I have designed a program to crop a tiff image.But after croping the tiff,the resultant file resolution is not the same as the original source file.
    In the program,the source file Nadeshiko_v1_02.tif has the resolution(X) of 1200 DPI and resolution(Y) has 1200 DPI pixels.
    But after croping the resolution of output file is 100 DPI.
    Please give me some idea on how to retain the same resolution.
    <code>
    package jai;
    import java.awt.Frame;
    import java.awt.image.RenderedImage;
    import java.awt.image.renderable.ParameterBlock;
    import java.awt.image.renderable.RenderableImage;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.imageio.*;
    import javax.imageio.stream.ImageOutputStream;
    import javax.media.jai.Interpolation;
    import javax.media.*;
    import javax.media.jai.JAI;
    import javax.media.jai.PlanarImage;
    import javax.media.jai.RenderedOp;
    import javax.media.jai.widget.ScrollingImagePanel;
    import com.sun.media.jai.codec.FileSeekableStream;
    import com.sun.media.jai.codec.SeekableStream;
    import com.sun.media.jai.codec.TIFFEncodeParam;
    import javax.media.jai.OperationDescriptorImpl;
    import java.io.*;
    import java.util.Iterator;
    import javax.media.jai.operator.*;
    // import javax.media.jai.widget.ScrollingImagePanel;
    public class crop {
              /** The main method. */
    public static void main(String[] args) {
    /* Validate input. */
    /* if (args.length != 1) {
    System.out.println("Usage: java JAISampleProgram " +
    "input_image_filename");
    // System.exit(-1);
    float a=(float) 70.3;
    float b=(float) 70.4;
    float c=(float) 3100.3;
    float d=(float) 5522.4;
    * Create an input stream from the specified file name
    * to be used with the file decoding operator.
    String TIFF="TIFF";
    FileSeekableStream stream = null;
    try {
         stream = new FileSeekableStream("D:\\tif images\\Nadeshiko_v1_02.tif");
    // stream = new FileSeekableStream("D:\\tif images\\Nadeshiko_v1_01.jpg");
    } catch (IOException e) {
    e.printStackTrace();
    System.exit(0);
    // Load the source image from a Stream.
    RenderedImage im = JAI.create("stream", stream);
    RenderedImage image2= CropDescriptor.create(im, a, b, c, d, null);
    ScrollingImagePanel panel = new ScrollingImagePanel(image2, 100, 100);
    // Create a frame to contain the panel.
    Frame window = new Frame("JAI Image Cropping");
    window.add(panel);
    window.pack();
    // window.show();
    // Define the source and destination file names.
    // String inputFile = "D:\\tif images\\Nadeshiko_v1_05.tif";
    String outputFile = "D:\\tif images\\Nadeshiko_v1_04.tif";
    // Save the image on a file. We cannot just store it, we must set the image encoding parameters
    // to ensure that it will be stored as a tiled image.
    TIFFEncodeParam tep = new TIFFEncodeParam();
    tep.setWriteTiled(true);
    tep.setTileSize(80,80);
    JAI.create("filestore",image2,outputFile,"TIFF",null);
    try {
                   stream.close();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    </code>
    Thanks,
    Sanat Meher

    Try the following,
    TIFFEncodeParam tep = new TIFFEncodeParam();
    // Create {X,Y}Resolution fields.
    TIFFField fieldXRes = new TIFFField(0x11A, TIFFField.TIFF_RATIONAL,
                                        1, new long[][] {{DPI_X, 1}});
    TIFFField fieldYRes = new TIFFField(0x11B, TIFFField.TIFF_RATIONAL,
                                        1, new long[][] {{DPI_Y, 1}});
    tep.setExtraFields(new TIFFField[] {fieldXRes, fieldYRes});

Maybe you are looking for