How can I make my thumbnails softer & smoother?

Hi, I am trying to create thumbnails from my digital camera. I have been comparing JMagick to the java2d api. My needs are simple - resize jpegs. I am finding indistinguishable image quality between the two when I resize except in the case of thumbnails. Those I am getting from the java2d package are looking sharp & brittle. The ones from Jmagick are soft & smooth. Can anyone please let me know how I can get softer & smoother thumbnails from Java2d? Here is my test that compares JMagick & java2d - notice there are several different possible ways I am saving using Java2d (JAI, AffineTransform, and Graphics2d). I am finding the best results (quickest) using AffineTransform. The Graphics2d approach below is of noticably worse quality. I'm new to this so any help is appreciated.
Craig
What it does: I am using this to take 1600 x 1200 images & create a copy, a 1024x768 image, and a 150x112 thumbnail.
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.awt.image.AffineTransformOp;
import java.awt.geom.AffineTransform;
import java.awt.image.renderable.ParameterBlock;
import java.io.*;
import javax.imageio.ImageIO;
import javax.imageio.ImageWriter;
import javax.imageio.IIOImage;
import javax.imageio.spi.ImageWriterSpi;
import javax.imageio.spi.IIORegistry;
import javax.media.jai.Interpolation;
import javax.media.jai.InterpolationBicubic;
import javax.media.jai.PlanarImage;
import javax.media.jai.JAI;
import java.util.*;
import magick.ImageInfo;
import magick.MagickException;
import magick.MagickImage;
import com.sun.image.codec.jpeg.*;
import com.sun.media.jai.codec.*;
* @version      1.0
* @author          creichenbach
public class JmagickVsJava2d
     private     static     int          MAX_THUMBSIZE           = 150;
     private     static     int          MAX_IMAGESIZE          = 1024;
     static     final      String          APPENDAGE_THUMB          = "_tn";
     static     final      String          APPENDAGE_MED_COPY      = "_MediumCopy";
     static     final      String          APPENDAGE_COPY           = "_Copy";
     //               THUMBNAILS                     //
     double scaleImageJava2d( List imgs, int maxSize, String appendage ) throws Exception
          long start = System.currentTimeMillis();
          int size = imgs.size();
          for ( int i=0;i<size;i++ )
               File f = (File) imgs.get( i );
               String imgPath = f.getAbsolutePath();
               String copyPath = imgPath.substring(0, imgPath.length()-4) + "Java2d"+appendage+".jpg";
               File infile = new File( imgPath );
               FileInputStream fis = new FileInputStream( infile );
               com.sun.image.codec.jpeg.JPEGImageDecoder decoder = com.sun.image.codec.jpeg.JPEGCodec.createJPEGDecoder(fis);
               BufferedImage im = decoder.decodeAsBufferedImage();
               fis.close();
               int width = im.getWidth();
               int height = im.getHeight();
               double scale = getScale( width, height, maxSize );
               //uncomment to use Affine Transform
               scaleAndSaveWithAffineTransform( scale, im, copyPath );
               //uncomment to use JAI
               //scaleAndSaveWithJAI( scale, im, copyPath );
               //uncomment to use Graphics2d
               //scaleAndSaveWithGraphics2d( im, width, height, maxSize, copyPath );
          long stop = System.currentTimeMillis();
          return getElapsedTime( start, stop );          
     double scaleImageJmagick( List imgs, int maxSize, String appendage ) throws IOException
          try
               long start = System.currentTimeMillis();
               int size = imgs.size();
               for ( int i=0;i<size;i++ )
                    File f = (File) imgs.get( i );
                    String imgPath = f.getAbsolutePath();
                    String copyPath = imgPath.substring(0, imgPath.length()-4) + "Jmagick"+appendage+".jpg";
                    ImageInfo imgInfo = new ImageInfo( imgPath );
                    MagickImage image = new MagickImage( imgInfo );
                    int width = (int) image.getDimension().getWidth();
                    int height = (int) image.getDimension().getHeight();
                    int[] dim = getImageDimensions( width, height, maxSize );
                    MagickImage thumbnail = image.scaleImage( dim[ 0 ], dim[ 1 ] );
                    thumbnail.setFileName( copyPath );
                    thumbnail.writeImage( imgInfo );
               long stop = System.currentTimeMillis();
               return getElapsedTime( start, stop );     
          catch (MagickException e)
               throw new IOException( "MagickException. Failure creating thumbnails." );
     //                    COPIES                     //
     double makeImageCopyJmagick( List imgs, String appendage ) throws Exception
          long start = System.currentTimeMillis();
          int size = imgs.size();
          for ( int i=0;i<size;i++ )
               File f = (File) imgs.get( i );
               String imgPath = f.getAbsolutePath();
               String copyPath = imgPath.substring(0, imgPath.length()-4) + "Jmagick"+appendage+".jpg";
               ImageInfo imgInfo = new ImageInfo( imgPath );
               MagickImage image = new MagickImage( imgInfo );
               image.setFileName( copyPath );
               //imgInfo.setQuality( 100 );
               image.writeImage( imgInfo );
          long stop = System.currentTimeMillis();
          return getElapsedTime( start, stop );
     double makeImageCopyJava2d( List imgs, String appendage ) throws Exception
          long start = System.currentTimeMillis();
          int size = imgs.size();
          for ( int i=0;i<size;i++ )
               File f = (File) imgs.get( i );
               String imgPath = f.getAbsolutePath();
               String copyPath = imgPath.substring(0, imgPath.length()-4) + "Java2d"+appendage+".jpg";
               File infile = new File( imgPath );
               BufferedImage im = ImageIO.read( infile );
               File outfile = new File( copyPath );
               ImageIO.write( im, "jpg", outfile );
          long stop = System.currentTimeMillis();
          return getElapsedTime( start, stop );
     void run() throws Exception
          File f = new File( "images" );
          List imgs = parseDirImages( f );
          int size = imgs.size();
          //resize thumbnail
          System.out.println( "starting resize thumbnail test" );
          double java2dTime = scaleImageJava2d( imgs, MAX_THUMBSIZE, APPENDAGE_THUMB );
          System.out.println( "java 2d scaled "+size+" images to "+MAX_THUMBSIZE+" in "+java2dTime+ " seconds" );
          double jmagickTime = scaleImageJmagick( imgs, MAX_THUMBSIZE, APPENDAGE_THUMB );
          System.out.println( "jmagick scaled "+size+" images to "+MAX_THUMBSIZE+" in "+jmagickTime+ " seconds" );
          //resize medium
          System.out.println( "starting resize medium test" );
          java2dTime = scaleImageJava2d( imgs, MAX_IMAGESIZE, APPENDAGE_MED_COPY );
          System.out.println( "java 2d scaled "+size+" images to "+MAX_IMAGESIZE+" in "+java2dTime+ " seconds" );
          jmagickTime = scaleImageJmagick( imgs, MAX_IMAGESIZE, APPENDAGE_MED_COPY );
          System.out.println( "jmagick scaled "+size+" images to "+MAX_IMAGESIZE+" in "+jmagickTime+ " seconds" );
          //copy test
          System.out.println( "starting copy test" );
          java2dTime = makeImageCopyJava2d( imgs, APPENDAGE_COPY );
          System.out.println( "java 2d copied "+size+" images in "+java2dTime+ " seconds" );
          jmagickTime = makeImageCopyJmagick( imgs, APPENDAGE_COPY );
          System.out.println( "jmagick copied "+size+" images in "+jmagickTime+ " seconds" );
     public static void main(String[] args)
          try
               JmagickVsJava2d jdt = new JmagickVsJava2d();
               jdt.run();
          catch ( Exception e )
               e.printStackTrace();
     //               UTILITY METHODS                    //
     static boolean isOriginal( String filename )
          int x;
          return (     (x = filename.indexOf( APPENDAGE_THUMB )) < 0 &&
                         (x = filename.indexOf( APPENDAGE_COPY )) < 0 &&
                         (x = filename.indexOf( APPENDAGE_MED_COPY )) < 0 );
     static boolean isImage( String filename )
          boolean isImage = false;
          int len = filename.length();
          String ext = filename.substring( len - 3 );
          isImage =      "jpg".equalsIgnoreCase( ext ) ||
                         "gif".equalsIgnoreCase( ext ) ||
                         "png".equalsIgnoreCase( ext );
          return isImage;
     private int[] getImageDimensions( int width, int height, int maxLen )
          int[] dimensions = new int[2];
          //get the larger of the 2 values
          int longest = width > height ? width : height;
          //determine what we need to divide by to get the longest side to be MAX_THUMBSIZE
          double divisor = (double)longest/(double)maxLen;
          double w = (double)width/divisor;
          double h = (double)height/divisor;
          dimensions[0] = (int) w;
          dimensions[1] = (int) h;
          return dimensions;
     private double getScale( int width, int height, int maxLen )
          double scale;
          //get the larger of the 2 values
          int longest = width > height ? width : height;
          return (double)maxLen/(double)longest;
     private double getElapsedTime( long start, long stop )
          long s = stop - start;
          double elapsed = (double) s/1000;     
          return elapsed;
     private List parseDirImages( File dir ) throws IOException     
          ArrayList imgFiles = new ArrayList();
          if ( dir.isDirectory() )
               File[] files = dir.listFiles();
               int len = files.length;
               for ( int i=0;i<len;i++ )
                    File f = files[ i ];
                    String filename = f.getName();
                    if ( isImage(filename) && isOriginal(filename) )
                         imgFiles.add( f );
               }//end for
          } //end if is directory
          else
               throw new IOException( dir.getName()+ "is not a valid directory." );
          return imgFiles;
     private void encodeJPEGImage( BufferedImage bi, String copyPath ) throws IOException
          if (bi != null && copyPath != null)
          {      // save image as Jpeg     
               FileOutputStream out = null;
               try
                    out = new FileOutputStream( copyPath );
               catch (java.io.FileNotFoundException fnf) {       
                    System.out.println("File Not Found");
               JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
               com.sun.image.codec.jpeg.JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
               param.setQuality(0.99f, false);
               encoder.encode(bi);
               out.close();
     * Scale with Java 2 standard graphics API
     private void scaleAndSaveWithAffineTransform( double scale, BufferedImage srcImg, String copyPath )
          throws IOException
     AffineTransform xform = AffineTransform.getScaleInstance( scale, scale);
          RenderingHints hints = new RenderingHints(     RenderingHints.KEY_RENDERING,
                                                                 RenderingHints.VALUE_RENDER_QUALITY);
//          RenderingHints hints = new RenderingHints(     RenderingHints.KEY_INTERPOLATION,
//                                                                 RenderingHints.VALUE_INTERPOLATION_BICUBIC);
          //AffineTransformOp op = new AffineTransformOp( xform, hints );
          AffineTransformOp op = new AffineTransformOp( xform, AffineTransformOp.TYPE_BILINEAR );
          BufferedImage dstImg = op.createCompatibleDestImage( srcImg, srcImg.getColorModel() );
          BufferedImage out = op.filter(srcImg, dstImg);
          encodeJPEGImage( out, copyPath );
     * Scale an image using the JAI API
     private void scaleAndSaveWithJAI( double scale, BufferedImage srcImg, String destName )
          throws IOException
          //using AffineTransform
          AffineTransform transform = AffineTransform.getScaleInstance( scale, scale);
          Interpolation interpolation = Interpolation.getInstance(Interpolation.INTERP_BICUBIC);
          PlanarImage img = (PlanarImage)JAI.create( "affine", srcImg, transform, interpolation);
          FileOutputStream fos = new FileOutputStream (destName);
          ImageEncoder enc = ImageCodec.createImageEncoder( "JPEG", fos, null );
          enc.encode( img );
          fos.close();
     private void scaleAndSaveWithGraphics2d(     BufferedImage      im,
                                                            int                width,
                                                            int                height,
                                                            int                maxSize,
                                                            String                copyPath )
          throws IOException
               int[] dim = getImageDimensions( width, height, maxSize );
               int tw = dim[ 0 ];
               int th = dim[ 1 ];
               HashMap hints = new HashMap( 2 );
               hints.put( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );
               hints.put( RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY );
               BufferedImage thumb = new BufferedImage( tw, th, BufferedImage.TYPE_INT_RGB );
               Graphics2D g2D = thumb.createGraphics();
               g2D.setRenderingHints( hints );
               g2D.drawImage( im, 0, 0, tw, th, null );
               File outfile = new File( copyPath );
               ImageIO.write( thumb, "jpg", outfile );     

Hi, You were right,
the resulting quality when scaling images using the drawImage method is
miserable. Thus there is a getScaledInstance method provided by the
Image class. This Method allows us to specify the scaling algorithm
(AREA_AVERAGING, SMOOTH, FAST...). Unforunately the jpeg encoder is only
capable to encode BufferedImage objects an not Image objects. So the
method listed below scales an Image, then uses a MediaTracker to wait
for the end of the scaling process an copy the scaled image into a
BufferedImage. One has to mention that the MediaTracker Contructer needs
a Component object. To me the reason for this is not really obvious, but
it seems we can feed it with any Component ( new Frame() should do the
job).
Regards,
Henning
private synchronized Image getScaledImage(Image ii, int nMaxWidth, int nMaxHeight) {
Image im = ii.getScaledInstance(nMaxWidth, nMaxHeight, Image.SCALE_AREA_AVERAGING);
MediaTracker mt = new MediaTracker(frame);
mt.addImage(im, 0);
try {
mt.waitForID(0);
} catch (Exception ie) {
System.out.println("exception scaling image:" + ie.getMessage());
if (mt.isErrorID(0)) {
// don't use the scaled icon if there was an error
im = ii;
System.out.println("getScaledImage():Error scaling the ImageIcon!!");
} else {
// scaling succeeded
return im;

Similar Messages

  • Bridge CS5...thumbnails.  How can I make the thumbnails larger?

    I can easily make my preview larger but cant seem to find anything to tell me how to make the thumbnails larger so they are easier
    to see.  Any suggestions?

    In the lower right corner there is a slider that will change the size of the thumbnails.

  • How can I make "Numbers" the soft by default ?

    Hello you all,
    I want to get off Windows. How can  I open incomming Windows files ( Word, excel,Ppoint) aqutomatically by i Work software?
    thanks for your suggestions
    Fanando

    Hi Fanado,
    In Finder, click once on an Excel document then Get Info (command i)
    Choose Open with: Numbers
    Then Change All... to make Numbers the app for all Excel documents.
    The same for Word and Powerpoint
    Regards,
    Ian.

  • How can I make the thumbnails bigger -- again?

    One of the things I dislike about my MacBook, Mac OS X 10.6.3, is that it often makes things on my screen smaller that I don't want shrunk because I make some gesture on the touchpad. I'm not sure what the offending gesture is, because this just happens to me randomly.
    It happened in iPhoto, and now the thumbnails are really small. I can't figure out how to make them big again. I have tried going to View - Thumbnails, but unfortunately the options after that are grayed out; i.e., I cannot choose any of them.
    Is there any way to restore the thumbnails to the default size?

    You an set all options back top their default by renewing the iPhoto preference file - quit iPhoto and go to "your user name" ==> library ==> preferences ==> com.apple.iPhoto.plist and trash it - launch iPhoto which creates a fresh new default preference file and reset any personal preferences you have changed and if you have moved the iPhoto library repoint to it. This may help
    BUT
    To increase the size of the iPhoto thumbnails just use the little slider toward the lower right hand corner of the iPhoto window.
    LN

  • How can I make the thumbnail cursor in PSE8 organizer stay at the current position?

    Whenever I am browsing through the thumbnail view in PSE8 organizer and I delete, edit, or sometimes when I apply a tag or a filter, the cursor automatically repositions to the first thumbnail in the catalog or the folder after the operation is complete, resulting in me losing my place, having to find it again, etc. -- which is a huge incovenience considering I have over 16,000 images in my catalog. Is there some way to force organizer to keep its place in the catalog?

    I believe you're using Display > Folder Location view, in which this behavior is most pronounced.  In Display > Thumbnail View (which sorts photos by date rather than folder), the problem generally doesn't occur.   Folder Location view is the PSE stepchild: slow, buggy, and poorly designed:
    http://www.johnrellis.com/psedbtool/photoshop-elements-faq.htm#_Folder_Location_view

  • How can i make a soft return with pages shift enter does not work!

    how can i make a soft return with pages shift plus enter does not work!!

    On full keyboards with a numeric keypad, the key above the right shift is "return" & the one on the numeric section is "enter." On a Mac (or Apple IIgs ) they do have separate functions. On the "mini" keyboards, both names are on the same key, but "enter" is written in smaller letters. I'll have to check to see how that works on another Mac later today.

  • 3D bar charts export as jagged PDFs - how can I make them smooth?

    I want to export my 3D bar charts as PDFs, but they export without anti-aliasing or smooth vector lines. The bars are jaggy, not clean. How can I make them higher quality?
    I've checked my system settings and those in Acrobat 7 Professional, the 'smoothing' is turned on. I can't find any similar posts here either.
    Any ideas?

    I want to export my 3D bar charts as PDFs, but they export without anti-aliasing or smooth vector lines. The bars are jaggy, not clean. How can I make them higher quality?
    I've checked my system settings and those in Acrobat 7 Professional, the 'smoothing' is turned on. I can't find any similar posts here either.
    Any ideas?

  • How can I make my external loaded .SWF file smoothly disappear after 15 seconds?

    Hi,
    How can I make my external loaded .SWF file smoothly disappear after 15 seconds? The following is the code to load an external .SWF file:
    var K:Loader=new Loader();
    addChild(K);
    K.load(new URLRequest("clock.swf"));
    K.x = 165;
    K.y = 247;
    K.contentLoaderInfo.addEventListener(Event.INIT, growLoader);
    function growLoader(evt:Event):void {
         K.width = 130;
         K.height = 130;
    I want to make clock.swf file disappear from the page after 15 seconds using some smooth disappear effect.
    Please help.
    Thanks.

    Something even better:
    http://www.greensock.com/
    Check out TimelineMax I LOVE it...
    The guy that made this (and gives it away for free!) is a saint.

  • How can I make Acrobat Pro XI open by default to thumbnails view (Pages Panel & Pages)?

    How can I make Acrobat Pro XI open by default to thumbnails view (Pages Panel & Pages) without changing the properties on every single pdf?

    Not possible. This is a file-specific setting, not an application-wide
    setting.

  • How can I make thumbnails in different sizes?

    Hi, How can I make thumbnails in different sizes?
    thanks, K

    Hi,
    Please take a look at this forum post for a similar discussion : Hello, I'd like to either randomize size of my thumbnails or simply have 2 different sized thumbnails in one portfolio. Thank you!
    Regards,
    Aish

  • When I download pictures from my camera, they turn out a nice big size in iPhoto; other pictures that have been e-mailed to me or imported from older libraries/other computers show up small.  Why is this, and how can I make them all the larger size?

    When I download pictures from my digital camera into iPhoto, they turn out a nice large size (usually almost the full screen), but when somebody e-mails me pictures and I import them into iPhoto, or when I transfer old photos from an old library into my new iPhoto library, they turn out very small--not exactly thumbnail-size, but too small to use for calendars or photo books.  I don't know much about computers, so I don't know how this happened.  Also, I can't find any discernible pattern to why this happens with some pictures and not others--ie: what I described above is usually true, but I have had e-mailed photos or old photos turn out the way I want them, which is in the larger size in iPhoto.  Why is this happening, and how can I make all the pictures the larger size?

    Some mail programs, including Apple Mail, can reduce the size of images that are attached to a message. It's happening at the sender's end, and all you can do is ask the sender for a larger image.

  • How can I make the execution of my script faster

    Hi everyone
    How can I make the execution of my script faster, because it takes a lot of time to execute? The following is my script:
    DECLARE
    CURSOR C1 IS
    SELECT A.ITEM_CODE,A.STORE_CODE,ST_UNIT,SA_UNIT,CART_QTY,QUANTITY_ON_HAND
    FROM PROJ.IM_LOCATION A
    WHERE A.ITEM_CODE BETWEEN :ITEM_FRM AND :ITEM_TO
    AND A.STORE_CODE = :FRM_STORE
    ORDER BY
    A.STORE_CODE ;
    CURSOR C2 IS
    SELECT A.ITEM_CODE,A.STORE_CODE,ST_UNIT,SA_UNIT,CART_QTY,QUANTITY_ON_HAND
    FROM PROJ.IM_LOCATION A
    WHERE A.ITEM_CODE BETWEEN :ITEM_FRM AND :ITEM_TO
    AND A.STORE_CODE = :FRM_STORE
    ORDER BY
    A.STORE_CODE ;
    big_syb_qty_issue number(12,3);
    small_syb_qty_issue number(12,3);
    big_issue number(12,3);
    small_issue number(12,3);
    item_syb_code varchar2(30);
    big_syb_qty_rec number(12,3);
    small_syb_qty_rec number(12,3);
    BI_SUPP_REC number(12,3);
    SM_SUPP_REC number(12,3);
    big_syb_qty_ADJ number(12,3);
    small_syb_qty_ADJ number(12,3);
    big_ADJ number(12,3);
    small_ADJ number(12,3);
    big_syb_qty_rec_iner number(12,3);
    small_syb_qty_rec_iner number(12,3);
    BI_INTER number(12,3);
    SM_INTER number(12,3);
    cl_big_qty number(12,3);
    cl_small_qty number(12,3);
    cl_big_qty1 number(12,3);
    cl_small_qty1 number(12,3);
    BIG_QTY_OPEN number(12,3);
    SMALL_QTY_OPEN number(12,3);
    BEGIN
         IF ((:FRM_STORE IS NULL) OR (:ITEM_FRM IS NULL) OR (:ITEM_TO IS NULL) OR (:DATE_FRM IS NULL)) THEN
              SHOW_MESSAGE('You Should Enter the Parameters Values Correctly Please try again !!!! ');
              RAISE FORM_TRIGGER_FAILURE;
              GO_FIELD('DATE_FRM');
         END IF;     
    DELETE FROM STOCK_AT_DATE_REP2;
    COMMIT;
    cl_big_qty := 0;
    cl_small_qty := 0;
    -- MESSAGE('Please Wait The System Calculating The Transactions !!!');
    SET_APPLICATION_PROPERTY(CURSOR_STYLE,'BUSY');
    FOR R IN C1
    LOOP
    cl_big_qty := R.CART_QTY ;
    cl_small_qty := R.QUANTITY_ON_HAND;
    -- Transerfer Data 1
    BEGIN
    SELECT B.ITEM_CODE,SUM(NVL(CART_QTY,0)) ,SUM(NVL(ITEM_QUANTITY,0))
    INTO item_syb_code,big_syb_qty_issue,small_syb_qty_issue
    FROM IM_TRANS_ISSUE_HEADER A,IM_TRANS_ISSUE_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND B.DEL_STORE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND DOC_DATE > :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- SHOW_MESSAGE('ISSUED BIG'||' '||big_syb_qty_issue);
    exception
    when no_data_found then big_syb_qty_issue := 0;
    small_syb_qty_issue := 0;
    when others then MESSAGE(10,sqlerrm);
    END ;
    -- Goods Received Data From Supplier 1
    BEGIN
    SELECT B.ITEM_CODE,SUM(B.CART_QTY),SUM(ITEM_QUANTITY)
    INTO item_syb_code,big_syb_qty_rec,small_syb_qty_rec
    FROM IM_GOODS_RECIEVE_HEADER A,IM_GOODS_RECIEVE_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND STORE_CODE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND DOC_DATE > :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- SHOW_MESSAGE('RECEIVED FROM SUPPLIER BIG'||' '||big_syb_qty_rec);
    exception
    when no_data_found then big_syb_qty_rec := 0;
    small_syb_qty_rec := 0;
    when others then message(10,sqlerrm);
    END ;
    -- Adjustement Data 1
    BEGIN
    SELECT B.ITEM_CODE ,SUM(NVL(CART_QTY,0)) ADJUST_QTY,SUM(NVL(ITEM_QUANTITY,0))
    INTO item_syb_code,big_syb_qty_ADJ,small_syb_qty_ADJ
    FROM IM_ADJUST_HEADER A,IM_ADJUST_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND B.STORE_CODE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND A.DOC_DATE > :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- SHOW_MESSAGE('Adjust BIG'||' '||big_syb_qty_ADJ);
    exception
    when no_data_found then big_syb_qty_ADJ := 0;
    small_syb_qty_ADJ := 0;
    when others then message(10,sqlerrm);
    END ;
    -- Goods Received Data From Stores 1
    BEGIN
    SELECT B.ITEM_CODE,SUM(B.CART_QTY),SUM(ITEM_QUANTITY)
    INTO item_syb_code,big_syb_qty_rec_iner,small_syb_qty_rec_iner
    FROM IM_TRANS_REC_HEADER A,IM_TRANS_REC_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND REC_STORE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND DOC_DATE > :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- show_message('here');
    -- SHOW_MESSAGE('Received From Stores BIG'||' '||big_syb_qty_rec_iner);
    exception
    when no_data_found then
    big_syb_qty_rec_iner := 0;
    small_syb_qty_rec_iner := 0;
    when others then message(10,sqlerrm);
    END ;
    cl_big_qty := (NVL(cl_big_qty,0) + NVL(big_syb_qty_issue,0));
    cl_big_qty := (NVL(cl_big_qty,0) - NVL(big_syb_qty_rec,0));
    cl_big_qty := (NVL(cl_big_qty,0) - NVL(big_syb_qty_rec_iner,0));
    big_syb_qty_ADJ := -1 * NVL(big_syb_qty_ADJ,0);
    cl_big_qty := (NVL(cl_big_qty,0) + NVL(big_syb_qty_ADJ,0));
    -- srw.message(2000,'cl_small_qty'||cl_small_qty);
    cl_small_qty := (NVL(cl_small_qty,0) + NVL(small_syb_qty_issue,0));
    cl_small_qty := (NVL(cl_small_qty,0) - NVL(small_syb_qty_rec,0));
    cl_small_qty := (NVL(cl_small_qty,0) - NVL(small_syb_qty_rec_iner,0));
    small_syb_qty_ADJ := -1 * NVL(small_syb_qty_ADJ,0);
    cl_small_qty := (NVL(cl_small_qty,0) + NVL(small_syb_qty_ADJ,0));
    -- srw.message(2000,'cl_small_qty'||cl_small_qty); srw.message(2000,'cl_small_qty'||cl_small_qty);
    INSERT INTO STOCK_AT_DATE_REP2
    VALUES(R.STORE_CODE,R.ITEM_CODE,cl_big_qty,cl_small_qty,R.ST_UNIT,R.SA_UNIT,:DATE_FRM,
    :DATE_TO,0,0,0,0,0,0,0,0,cl_big_qty,cl_small_qty);
    cl_big_qty := 0;
    cl_small_qty := 0;
    END LOOP;
    COMMIT;
    FOR R IN C2
    LOOP
    -- Transerfer Data 2
    BEGIN
    SELECT B.ITEM_CODE,SUM(NVL(CART_QTY,0)) ,SUM(NVL(ITEM_QUANTITY,0))
    INTO item_syb_code,big_issue,small_issue
    FROM IM_TRANS_ISSUE_HEADER A,IM_TRANS_ISSUE_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND B.DEL_STORE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND DOC_DATE BETWEEN :DATE_FRM AND :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- SHOW_MESSAGE('ISSUED BIG'||' '||big_syb_qty_issue);
    exception
    when no_data_found then
    big_issue := 0;
    small_issue := 0;
    when others then MESSAGE(10,sqlerrm);
    END ;
    -- Goods Received Data From Supplier 2
    BEGIN
    SELECT B.ITEM_CODE,SUM(NVL(B.CART_QTY,0)),SUM(NVL(ITEM_QUANTITY,0))
    INTO item_syb_code,BI_SUPP_REC,SM_SUPP_REC
    FROM IM_GOODS_RECIEVE_HEADER A,IM_GOODS_RECIEVE_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND STORE_CODE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND DOC_DATE BETWEEN :DATE_FRM AND :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- SHOW_MESSAGE('1- SM_SUPP_REC '||' '||SM_SUPP_REC );
    -- SHOW_MESSAGE('RECEIVED FROM SUPPLIER BIG'||' '||big_syb_qty_rec);
    exception
    when no_data_found then
    BI_SUPP_REC := 0;
    SM_SUPP_REC := 0;
    when others then message(10,sqlerrm);
    END ;
    -- Adjustement Data 2
    BEGIN
    SELECT B.ITEM_CODE ,SUM(NVL(CART_QTY,0)) ADJUST_QTY,SUM(NVL(ITEM_QUANTITY,0))
    INTO item_syb_code,big_ADJ,small_ADJ
    FROM IM_ADJUST_HEADER A,IM_ADJUST_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND B.STORE_CODE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND A.DOC_DATE BETWEEN :DATE_FRM AND :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- SHOW_MESSAGE('Adjust BIG'||' '||big_syb_qty_ADJ);
    exception
    when no_data_found then
    big_ADJ := 0;
    small_ADJ := 0;
    when others then message(10,sqlerrm);
    END ;
    -- Goods Received Data From Stores 2
    BEGIN
    SELECT B.ITEM_CODE,SUM(NVL(B.CART_QTY,0)),SUM(NVL(ITEM_QUANTITY,0))
    INTO item_syb_code,BI_INTER,SM_INTER
    FROM IM_TRANS_REC_HEADER A,IM_TRANS_REC_DETAILS B
    WHERE A.DOC_CODE = B.DOC_CODE
    AND REC_STORE = R.STORE_CODE
    AND ITEM_CODE = R.ITEM_CODE
    AND DOC_DATE BETWEEN :DATE_FRM AND :DATE_TO
    GROUP BY
    B.ITEM_CODE;
    -- show_message('here');
    -- SHOW_MESSAGE('Received From Stores BIG'||' '||big_syb_qty_rec_iner);
    exception
    when no_data_found then
    BI_INTER := 0;
    SM_INTER := 0;
    when others then message(10,sqlerrm);
    END ;
    BEGIN
         BIG_QTY_OPEN := 0;
    SMALL_QTY_OPEN := 0;
    BEGIN
    SELECT NVL(S_BIG_QTY_OPEN,0) ,NVL(S_SMALL_QTY_OPEN,0)
    INTO
    BIG_QTY_OPEN,SMALL_QTY_OPEN
    FROM STOCK_AT_DATE_REP2
    WHERE S_STORE_CODE = R.STORE_CODE
    AND S_ITEM_CODE = R.ITEM_CODE;
    END;
    BIG_QTY_OPEN := ((BIG_QTY_OPEN) + NVL(big_issue,0));
    BIG_QTY_OPEN := ((BIG_QTY_OPEN) - NVL(BI_SUPP_REC,0));
    big_adj := -1 * NVL(big_adj,0);
    BIG_QTY_OPEN := ((BIG_QTY_OPEN) + NVL(big_adj,0));
    BIG_QTY_OPEN := ((BIG_QTY_OPEN) - NVL(BI_INTER,0));
    SMALL_QTY_OPEN := ((SMALL_QTY_OPEN) + NVL(SMALL_issue,0));
    SMALL_QTY_OPEN := ((SMALL_QTY_OPEN) - NVL(SM_SUPP_REC ,0));
    SMALL_adj := -1 * NVL(SMALL_adj,0);
    SMALL_QTY_OPEN := ((SMALL_QTY_OPEN) + NVL(SMALL_adj,0));
    SMALL_QTY_OPEN := ((SMALL_QTY_OPEN) - NVL(SM_INTER,0));
    END;
    BEGIN
    UPDATE STOCK_AT_DATE_REP2
    SET BIG_SUP_REC = BI_SUPP_REC,
    SMALL_SUP_REC = SM_SUPP_REC,
    BIG_ISSUE_TRAN = big_issue,
    SMALL_ISSUE_TRAN = SMALL_issue,
    BIG_ADJUST = big_adj,
    SMALL_ADJUST = SMALL_adj,
    BIG_INTER_REC = BI_INTER,
    SMALL_INTER_REC = SM_INTER,
    S_BIG_QTY_OPEN = BIG_QTY_OPEN,
    S_SMALL_QTY_OPEN = SMALL_QTY_OPEN
    WHERE S_STORE_CODE = R.STORE_CODE
    AND S_ITEM_CODE = R.ITEM_CODE;
    exception
    when no_data_found then
    NULL;
    when others then
    message(10,sqlerrm);
    END;
    END LOOP;
    COMMIT;
    SET_APPLICATION_PROPERTY(CURSOR_STYLE,'default');
    SYNCHRONIZE;
    -- SHOW_MESSAGE('The Data Have Been Calculated !!!');
    END;
    declare
         pl_id ParamList;
    APPLICATION_ID VARCHAR2(20):='PRD';
              COMMAND_LINE VARCHAR2(100) :='STOCK_LEDGER';
    BEGIN
    pl_id := Get_Parameter_List('tmpdata');
    IF NOT Id_Null(pl_id) THEN
    Destroy_Parameter_List( pl_id );
    END IF;
    pl_id := Create_Parameter_List('tmpdata');
    Add_Parameter(pl_id,'DATE_FRM',TEXT_PARAMETER,:DATE_FRM);
    Add_Parameter(pl_id,'DATE_TO',TEXT_PARAMETER,:DATE_TO);
    Add_Parameter(pl_id,'ITEM_FRM',TEXT_PARAMETER,:ITEM_FRM);
    Add_Parameter(pl_id,'ITEM_TO',TEXT_PARAMETER,:ITEM_TO);
    Add_Parameter(pl_id,'FRM_STORE',TEXT_PARAMETER,:FRM_STORE);
    IF :REPORT_TYPE = 1 THEN
    Run_Product(REPORTS,'C:\INV\RDF\STOCK_LEDGER.rdf',SYNCHRONOUS,RUNTIME,
    FILESYSTEM, pl_id,NULL);
    ELSIF :REPORT_TYPE = 2 THEN
    Run_Product(REPORTS,'C:\INV\RDF\STOCK_LEDGER_2.rdf',SYNCHRONOUS,RUNTIME,
    FILESYSTEM, pl_id,NULL);
    END IF;
    END;
    Waiting for your valuable answer
    Best Regards
    Jamil Alshaibani

    Make a matte in Photoshop.
    From the Photoshop menu bar: File > New > Film & Video Presets. Choose one that suits your FCP project pixel dimensions. Make the background black. Place a white rectangle with rounded corners on top (the white will determine how much of your picture is visible). Flatten Image. Save as TIFF. Import into FCP.
    Move your video clips up to V2. Place the imported TIFF on V1. Highlight all clips on V2.
    Go to Modify > Composite Mode > Travel Matte Luma. Done.
    If you want soft edges, no need for a matte. Double click your clip to place it in the Viewer. Open up the Motion tab > Crop > Edge Feather. Nice and quick. Copy and Paste attributes for the other clips.

  • On images that are long and narrow horizontally, iPhoto truncates them and automaticall crops off part of each end of the image.  How can I make it stop?

    On images that are long and narrow horizontally, iPhoto truncates them and automatically crops off part of each end of the image.  the thumbnail has a jagged, serrated edge at both ends.  How can I make it stop?

    Then I do not get your problem - you can import the photo - you can find the photo and you can edit and save the photo - what more do you want?
    By defination thumbnails are small images to help you find the large image - the large image is fine and you can find it fine - and you know it is only showing part of the image because of the "jagged ends"
    If you think think that iPhoto should display long thumbnails suggest to Apple - iPhoto menu ==> provide iPhoto Feedback
    as to your digital photoframe - contact them - in general gital photos frames display one and only one aspect ratio and any photo that is not in that aspect ratio will be modified to display - either cropped to the proper size for the frame or have 'White" space added to fill the frame - that function is totally controled by the Digital Photo frame and any otptions you have will be in the manual or on the support web site for the frame - to put it in old film terms - you can not put an 8x10 print in a 5x7 frame unless you cut the photo down (or a 8x15 photo in an 8x10 frame either)
    LN

  • How Can I Make Acrobat Not Resize Images?

    I am trying to turn around 80 images into the pages of a PDF file. The pictures are saved as JPEGs and have the exact dimensions I want them to have as pages of a PDF. When I turn them into a PDF in Acrobat Pro 9 they get resized so when viewed at 100% the text looks like crap. I want to know how I can make Acrobat not mess with the dimensions of my pictures when turning them into a PDF. I make the PDF by clicking the Create button and selecting Merge Files into a Single PDF... . I then drag and drop the pictures into the window and click Combine Files. I have tried all three of the File Size settings and all of them turn out wrong. How can I make this expensive program work the way I want it to by doing htis simple thing right?
    I have attached two files, the first of one of the images that will make a page viewed in windows picture and fax viewer at the original size. The second is a screen shot of the messed up PDF with blurry text, viewed at 100%. I want the text in the second picture to look just like the text in the first.

    I am not trying to justify Adobe's choice, just an explanation of what may have happened. When one asks for 100%, there is a question of by pixel, by inches (cm), or by size on the screen. These are interpretations and the fact that MS and Adobe interpret them differently is not surprising. However, I think that what you are seeing is a result of the pixel display issues on the screen and with proper sizing, they should appear the same (at least I think). In Acrobat, there is also a smoothing feature under the display preferences that may be an issue and is related to how it extrapolates for the pixels.

  • Trying to add 2 slideshows to one page, how can I make a slideshow so it does not show an image...

    Trying to add 2 slideshows to one page, how can I make a slideshow so it does not show an image until they click on the thumbnail?

    You can do this with "composition" widgets.

Maybe you are looking for

  • How to submit a form in jsp from tag handler class

    I have a form in jsp.I created some more links in the tag handler class.Based on the link we click form action will take place.Now how can i submit the form in tag handler class for the links i created in that class.

  • 3 machines but all the same iTunes media files

    We have 3 machines in my house and I want all the machines to have the same media on all . Not sure how to go ab out it.

  • Roles for SOAMANAGER

    Hi All, We are trying to test an ABAP WebService with the SOAMANGER. I am ablw to launch the webservice but when I click on th "TEST" link on this page (SOAMANAGER) it asks me for my login information. When I give my username and password, it doesnt

  • Connecting to MySQL...MM.MySQL and TWZ

    I'm getting an SQLException "No suitable driver" with MM.MySQL. I've read the MM.MySQL HTML docs and there is a section detailing that error but none of it helps. Meaning I've addressed: 1. ClassPath settings 2. "//" in url - various different ways 3

  • Battlefield 3 and RAGE under Bootcamp

    Apple REALLY needs to update its Bootcamp video drivers if these puppies are to work. There are probably also a long list of other current Windows games that are falling over due to lack of current ATI (and probably Nvidea) drivers, and its really ir