Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.ImageLoader.save()


          _thumb
        };

      ByteArrayOutputStream bos = new ByteArrayOutputStream(64000);

      imldr.save(bos, SWT.IMAGE_JPEG);

      InputStream thumbIs = new ByteArrayInputStream(bos.toByteArray());

      ps.setBinaryStream(9, thumbIs);
View Full Code Here


          _thumb
        };

      ByteArrayOutputStream bos = new ByteArrayOutputStream(64000);

      imldr.save(bos, SWT.IMAGE_JPEG);

      InputStream thumbIs = new ByteArrayInputStream(bos.toByteArray());

      ps.setBinaryStream(9, thumbIs);
View Full Code Here

          _thumb
        };

      ByteArrayOutputStream bos = new ByteArrayOutputStream(64000);

      imldr.save(bos, SWT.IMAGE_JPEG);

      InputStream thumbIs = new ByteArrayInputStream(bos.toByteArray());

      ps.setBinaryStream(9, thumbIs);
View Full Code Here

                    {
                        ImageLoader imageLoader = new ImageLoader();
                        imageLoader.data = new ImageData[]
                            { imageData };
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
                        imageLoader.save( baos, requiredImageType );
                        newImageRawDataInRequiredFormat = baos.toByteArray();
                    }
                    else
                    {
                        newImageRawDataInRequiredFormat = newImageRawData;
View Full Code Here

                    {
                        ImageLoader imageLoader = new ImageLoader();
                        imageLoader.data = new ImageData[]
                            { imageData };
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
                        imageLoader.save( baos, requiredImageType );
                        newImageRawDataInRequiredFormat = baos.toByteArray();
                    }
                    else
                    {
                        newImageRawDataInRequiredFormat = newImageRawData;
View Full Code Here

                        // Converting the new image in the required format
                        ImageLoader imageLoader = new ImageLoader();
                        imageLoader.data = new ImageData[]
                            { imageData };
                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
                        imageLoader.save( baos, requiredImageType );
                        newImageRawDataInRequiredFormat = baos.toByteArray();
                    }
                    else
                    {
                        // Directly using the new image bytes
View Full Code Here

              imgLoader.data = new ImageData[] { croppedImage
                  .getImageData() };
              monitor.worked(1);
              switch (outputFormat) {
              case 0:
                imgLoader.save(saveLocation, SWT.IMAGE_PNG);
                break;
              case 1:
                imgLoader.save(saveLocation, SWT.IMAGE_JPEG);
                break;
              default:
View Full Code Here

              switch (outputFormat) {
              case 0:
                imgLoader.save(saveLocation, SWT.IMAGE_PNG);
                break;
              case 1:
                imgLoader.save(saveLocation, SWT.IMAGE_JPEG);
                break;
              default:
                imgLoader.save(saveLocation, SWT.IMAGE_GIF);
              }
              monitor.worked(2);
View Full Code Here

                break;
              case 1:
                imgLoader.save(saveLocation, SWT.IMAGE_JPEG);
                break;
              default:
                imgLoader.save(saveLocation, SWT.IMAGE_GIF);
              }
              monitor.worked(2);
              imageGC.dispose();
              croppedImage.dispose();
              monitor.done();
View Full Code Here

      Image image = panel.getImage();
      System.out.println(image.getBounds());
      {
        ImageLoader imageLoader = new ImageLoader();
        imageLoader.data = new ImageData[]{image.getImageData()};
        imageLoader.save("c:/temp/1.png", SWT.IMAGE_PNG);
      }
      int width = image.getBounds().width;
      int height = image.getBounds().height;
      assertRGB(getPixelRGB(image, 0, 0), 0xFF, 0, 0);
      assertRGB(getPixelRGB(image, width - 1, 0), 0xFF, 0, 0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.