Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.ImageLoader


                setTitle("SCA ComponentType");
                setDescription("Create a new SCA ComponentType.");
               
                try {
                        String location = FileLocator.toFileURL(Platform.getBundle("org.apache.tuscany.sca.core").getEntry("/")).getFile().toString();
                        setImageDescriptor(ImageDescriptor.createFromImageData((new ImageLoader()).load(location + "/icons/tuscany.gif")[0]));
                } catch (Exception e) {
                    error("Could not create wizard", e);
                }
               
                setFileName("sample.componentType");
View Full Code Here


      // (8) ORIENTATION INT(1)
      ps.setInt(8, 0);

      // (9) THUMB_LARGE
      ImageLoader imldr = new ImageLoader();

      imldr.data = new ImageData[]
        {
          _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

      // (8) ORIENTATION INT(1)
      ps.setInt(8, 0);

      // (9) THUMB_LARGE
      ImageLoader imldr = new ImageLoader();

      imldr.data = new ImageData[]
        {
          _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

      // (8) ORIENTATION INT(1)
      ps.setInt(8, 0);

      // (9) THUMB_LARGE
      ImageLoader imldr = new ImageLoader();

      imldr.data = new ImageData[]
        {
          _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

      // (8) ORIENTATION INT(1)
      ps.setInt(8, 0);

      // (9) THUMB_LARGE
      ImageLoader imldr = new ImageLoader();

      imldr.data = new ImageData[]
        {
          _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

                try
                {
                    ImageData imageData = new ImageData( new ByteArrayInputStream( newImageRawData ) );
                    if ( imageData.type != requiredImageType )
                    {
                        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

   *                be saved to the requested format</li>
   *                </ul>
   */
  public static void SaveImage(ImageData imageData, File imageFile, int format)
  {
    if (loader == null) loader = new ImageLoader();
    loader.save(imageFile.getAbsolutePath(), format);
  }
View Full Code Here

                try
                {
                    ImageData imageData = new ImageData( new ByteArrayInputStream( newImageRawData ) );
                    if ( imageData.type != requiredImageType )
                    {
                        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

                {
                    ImageData imageData = new ImageData( new ByteArrayInputStream( newImageRawData ) );
                    if ( imageData.type != requiredImageType )
                    {
                        // 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

                setTitle("SCA Composite");
                setDescription("Create a new SCA Composite.");
               
                try {
                        String location = FileLocator.toFileURL(Platform.getBundle("org.apache.tuscany.sca.plugin.core").getEntry("/")).getFile().toString();
                        setImageDescriptor(ImageDescriptor.createFromImageData((new ImageLoader()).load(location + "/icons/tuscany.gif")[0]));
                } catch (Exception e) {
                    error("Could not create wizard", e);
                }
               
                setFileName("sample.composite");
View Full Code Here

TOP

Related Classes of org.eclipse.swt.graphics.ImageLoader

Copyright © 2018 www.massapicom. 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.