Draw image between edges in another image

HI
i try to draw an image between a specified edges in another image
can any one help me and provide me with a code that perform this task

elsabry wrote:
HI
i try to draw an image between a specified edges in another imageHow are the 'edges' specified? It is easy to draw one image, then another over the top that has areas of transparency.
can any one help me and provide me with a code that perform this taskWhat have you got so far? Note that these forums are not a 'code generation machine'.
BTW - To help your reader, please put a single upper case letter at the start of every sentence, and a full-stop (or question mark, or exclamation mark) at the end. This helps the reader to quickly scan the text, looking for ways to help. You would not want to make it harder to help, would you?

Similar Messages

  • Problems drawing images form another class

    Ok as the title says I'm having trouble drawing images from a different class. I have a class that represents a plane and it has a draw' method that draws its .gif image.
    public void draw (Graphics g)
    g.drawImage(planepic , xPos, yPos, null)
    then in my main class in the paint method i have
    plane.draw(g);
    I think my problem is the null for my image observer. I tried using null as my image observer and i got a error saying i can't make a static reference to a non static method.
    I've done some research because i never really understood static but i still don't quite get it.
    Also when I use this as my image observer i get a error in my plane object.
    I also just tried passing and making a object for my main class and i still got the static error.
    Any help is appreciated and thanks in advance

    Ok as the title says I'm having trouble drawing
    images from a different class. I have a class that
    represents a plane and it has a draw' method that
    draws its .gif image.
    public void draw (Graphics g)
    g.drawImage(planepic , xPos, yPos, null)
    in my main class in the paint method i have
    plane.draw(g);
    I think my problem is the null for my image observer.
    I tried using null as my image observer and i got a
    error saying i can't make a static reference to a non
    static method. Use a minimal implementation of the ImageObserver to be sure.
    public class Plane implements ImageObserver
    public boolean imageUpdate(
    Image img,int infoFlags,int x,int y,int width,int height)
       switch(infoFlags)
          case ALLBITS:
                    return false;
          case SOMEBITS:
                    return true;
          default:
                return true;
    I've done some research because i never really
    understood static but i still don't quite get it.
    Also when I use this as my image observer i get a
    error in my plane object.
    I also just tried passing and making a object for my
    main class and i still got the static error.
    Any help is appreciated and thanks in advanceWhen you call draw(g) from your other class you hand it a Graphics context that you instantiated somewhere else ie: in another class. Without a more complete example it is really impossible to determine your issue for sure,
    but if I was to guess I would say you need to make sure that the Graphics context handed to the draw(Graphics) method was instantiated from a Component that was already visible. ie: Do a f
    Frame.createImage() from your parent frame after iyou have already called setVisible(true); In other words I suspect you are making and Image from some other Component that is not yet visible. That however is a guess so if not the issue post the rest of the code or at least a minimal implementation that demonstrates this.
    About static:
    static means the class/variable is the same throughout ALL classes of that type and if changed in one instance it will change and thus be the same for all instances.
    You CAN call static by referencing the base class Object without having to instantiate.
    ie:given
    public class SomeClass
    static String name;
    static String getName
       if(name == null)
          name = "DefaultName";
       return name;
    }Thus you could call..
      String name = SomeClass.getName();As opposed to
    SomeClass myClass = new SomeClass();
          myClass.getName();This can get you in trouble if you try to make a method that is static
    that then tries to reference non static variables.
    ie:
    public class SomeClass
    int x;
    static String name;
    SomeClass()
       x=0;
    static String getName
       if(name == null)
          name = "DefaultName";
       x++;
       return name;
    }In this case SomeClass.getName(); will throw and exception because it is trying to access[b] x  from a static context .
    Hope that clears that up for you; if not post a more complete example.
    Good Luck!
    (T)

  • Drawing image so that it appears on top of another

    Alright, this question isn't as straight forward as it may seem. Yes, I want to draw an image so that it appears on top of another drawn image, but the image I am trying to draw is being drawn in another thread like so:
    public class myApplet extends Applet implements Runnable
      public Graphics g;
      public Thread myThread;
      public void init()
        myThread = new Thread(this);
        myThread.start();
      public void paint()
         super.paint(g);
         //Assume that I loaded in the images properly
         g.drawImage(image1, 0, 0, null); //Assume image1 is a 50 px X 50 px image
      public void run()
         g.drawImage(image2, 0, 0, null); //Assume image2 is a 20 px X 20 px image
    }This also happens if I try to do "g.fillRect();". The 50 X 50 image appears on top of the 20 x 20 image. Does anyone know a way that I can tell the program to draw the image in the thread AFTER the image in the paint method (I know I should be using paintComponent, but this is a sample program. Please don't get too picky about it. I typed it up simply for this post and I wanted to make it simple).
    The reason I'm drawing it in the paint method is because I am making an image move along a set of points. The points are formulated inside the run() method. If I draw it inside of the paint() method it skips points.
    Any help would be GREAT. Thank you.
    Edited by: dustty1818 on Apr 11, 2009 9:05 AM

    dustty1818 wrote:
    public class myApplet extends Applet implements Runnable
    public Graphics g;
    public void run()
    g.drawImage(image2, 0, 0, null); //Assume image2 is a 20 px X 20 px image
    }Edited by: dustty1818 on Apr 11, 2009 9:05 AMDusty,
    There are several serious (fatal) flaws with your design. The biggest is that you should NEVER hold
    on to a Graphics object. If anything you should be calling dispose at the end of the paint method.
    It appears that you are accidentally trying to use a technique called "active rendering".
    You can do active rendering in Java but it would look nothing like what you are doing (and is much
    more advanced). You must resolve to keep all drawing in (or preferably called from) the paint method.
    Have your run() method call repaint() and have your paint() method have all the information it
    needs to render the scene.
    Also, and this is comparatively minor, extend JApplet.
    example:
    import java.awt.*;
    import javax.swing.*;
    public class SceneRenderer extends JApplet implements Runnable{
         Point pt1 = new Point(0, 0);
         Point pt2 = new Point(0, 0);
         public void init(){
              Thread animationThread = new Thread(this);
              animationThread.start();
         public void paint(Graphics g){
              super.paint(g);
              g.setColor(Color.RED);
              g.fillRect(pt1.x, pt1.y, 50, 50);
              g.setColor(Color.BLUE);
              g.fillRect(pt2.x, pt2.y, 20, 20);
         public void run(){
              while(true){
                   pt1.x += 1;
                   pt2.x += 1;
                   repaint();
                   try{
                        Thread.sleep(60);
                   } catch(Exception e){}
    }

  • Drawing Images. Making them Durable?

    Im trying to create an application that draws images to the screen. So for example, it draws an image (call it image x) where the user left clicks the mouse. It draws fine. Then when the user clicks at a new spot, the first image x is erased when the next is placed on the screen. This isn't what I want, I want all previous images from clicking to say. From searching, it seems my problem is that drawn images are not durable. Other forum posts didn't help me understand the solution to the problem so any help would be wonderful.
    Edited by: goyanks135 on May 12, 2009 6:13 PM

    Thanks for the quick reply, that seems to work best for this application. Another thing, is there any way to generate a BufferedImage that represents the panel? Currently I am using:
    <BufferedImage> = robot.createScreenCapture(<Rectangle>);
    to do so, but would not depending on where the window is on the screen. I couldn't figure out how to determine the windows location. Is there a method to create the BufferedImage or obtain the window's coordinates?
    edit: I was looking at the getLocation() and getSize() methods of the component class. Seems like they should work if I use
    <BufferedImage> = robot.createScreenCapture(new Rectangle (getLocation(), getSize());
    I'm going to bed right now and didn't get it to work. Seems like it should.
    Edited by: goyanks135 on May 12, 2009 7:01 PM

  • How can I draw image in a vbean?

    How can I draw image in a vbean?
    this is my code :
    import java.awt.BorderLayout;
    import java.awt.Image;
    import java.awt.Graphics;
    import java.net.MalformedURLException;
    import java.net.URL;
    import com.sun.jimi.core.Jimi;
    import oracle.forms.handler.IHandler;
    import oracle.forms.properties.ID;
    import oracle.forms.ui.VBean;
    public class PrintEmailLogo extends VBean {
         URL url;
         Image img;
         boolean ImageLoaded = false;
         public void paint(Graphics g) {
              if (ImageLoaded) {
                   System.out.println("yes~~~");
                   g.drawImage(img, 0, 0, null);
              } else
                   System.out.println("no~~~");
         public boolean imageUpdate(Image img, int infoflags, int x, int y, int w,
                   int h) {
              if (infoflags == ALLBITS) {
                   System.out.println("yes");
                   ImageLoaded = true;
                   repaint();
                   return false;
              } else
                   return true;
         public void init(IHandler arg0) {
              super.init(arg0);
              try {
                   url = new URL("file:print/77G.gif");
                   img = Jimi.getImage(url);
                   Image offScreenImage = createImage(size().width, size().height);
                   Graphics offScreenGC = offScreenImage.getGraphics();
                   System.out.println(offScreenGC.drawImage(img, 0, 0, this));
              } catch (MalformedURLException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    but when I run it in forms
    when it run Graphics offScreenGC = offScreenImage.getGraphics();
    It throw a exception:
    java.lang.NullPointerException     at com.avicit.aepcs.calendar.PrintEmailLogo.init(PrintEmailLogo.java:72)     at oracle.forms.handler.UICommon.instantiate(Unknown Source)     at oracle.forms.handler.UICommon.onCreate(Unknown Source)     at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)     at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)     at oracle.forms.engine.Runform.processMessage(Unknown Source)     at oracle.forms.engine.Runform.processSet(Unknown Source)     at oracle.forms.engine.Runform.onMessageReal(Unknown Source)     at oracle.forms.engine.Runform.onMessage(Unknown Source)     at oracle.forms.engine.Runform.processEventEnd(Unknown Source)     at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)     at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)     at java.awt.Component.dispatchEventImpl(Unknown Source)     at java.awt.Container.dispatchEventImpl(Unknown Source)     at java.awt.Component.dispatchEvent(Unknown Source)     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)     at java.awt.Container.dispatchEventImpl(Unknown Source)     at java.awt.Component.dispatchEvent(Unknown Source)     at java.awt.EventQueue.dispatchEvent(Unknown Source)     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)     at java.awt.EventDispatchThread.run(Unknown Source)
    I change it to:
    import java.awt.BorderLayout;
    import java.awt.Image;
    import java.awt.Graphics;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.swing.JFrame;
    import com.sun.jimi.core.Jimi;
    import oracle.forms.handler.IHandler;
    import oracle.forms.properties.ID;
    import oracle.forms.ui.VBean;
    public class PrintEmailLogo extends VBean {
         URL url;
         Image img;
         public void paint(Graphics g) {
              try {
                   url = new URL("file:print/77G.gif");
                   img = Jimi.getImage(url);
                   g.drawImage(img, 0, 0, this));
              } catch (MalformedURLException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         public void init(IHandler arg0) {
              super.init(arg0);
    But it display nothing.
    It isn't paint continuous.
    what's wrong in my vbean?
    please help me.

    The following code works fine for me:
    package oracle.forms.fd;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import oracle.forms.handler.IHandler;
    import oracle.forms.properties.ID;
    import oracle.forms.ui.CustomEvent;
    import oracle.forms.ui.VBean;
    public class test extends VBean {
      private URL url;
      private URL m_codeBase; 
      private Image img;
    public void paint(Graphics g) {
      // draw the image
      g.drawImage(img, 0, 0, this);
    public void init(IHandler arg0) {
       super.init(arg0);
       // load image file
       img = loadImage("file:///c:/coyote.jpg");   
    public test()
        super();
       *  Load an image from JAR file, Client machine or Internet URL  *
      private Image loadImage(String imageName)
        URL imageURL = null;
        boolean loadSuccess = false;
        Image img = null ;
        //JAR
        imageURL = getClass().getResource(imageName);
        if (imageURL != null)
          try
            img = Toolkit.getDefaultToolkit().getImage(imageURL);
            loadSuccess = true;
            return img ;
          catch (Exception ilex)
            System.out.println("Error loading image from JAR: " + ilex.toString());
        else
          System.out.println("Unable to find " + imageName + " in JAR");
        //DOCBASE
        if (loadSuccess == false)
          System.out.println("Searching docbase for " + imageName);
          try
            if (imageName.toLowerCase().startsWith("http://")||imageName.toLowerCase().startsWith("https://"))
              imageURL = new URL(imageName);
            else if(imageName.toLowerCase().startsWith("file:"))
              imageURL = new URL(imageName);
            else
              imageURL = new URL(m_codeBase.getProtocol() + "://" + m_codeBase.getHost() + ":" + m_codeBase.getPort() + imageName);
            System.out.println("Constructed URL: " + imageURL.toString());
            try
              img = createImage((java.awt.image.ImageProducer) imageURL.getContent());
              loadSuccess = true;
              System.out.println("Image found: " + imageURL.toString());
              return img ;
            catch (Exception ilex)
              System.out.println("Error reading image - " + ilex.toString());
          catch (java.net.MalformedURLException urlex)
            System.out.println("Error creating URL - " + urlex.toString());
        //CODEBASE
        if (loadSuccess == false)
          System.out.println("Searching codebase for " + imageName);
          try
            imageURL = new URL(m_codeBase, imageName);
            System.out.println("Constructed URL: " + imageURL.toString());
            try
              img = createImage((java.awt.image.ImageProducer) imageURL.getContent());
              loadSuccess = true;
              System.out.println("Image found: " + imageURL.toString());
              return img ;
            catch (Exception ilex)
                    System.out.println("Error reading image - " + ilex.toString());
          catch (java.net.MalformedURLException urlex)
            System.out.println("Error creating URL - " + urlex.toString());
        if (loadSuccess == false)
          System.out.println("Error image " + imageName + " could not be located");
        return img ;
    }Francois

  • Can one add more than one photo layer to a draw image?

    I cannot seem to find a way to add more than one photo or photo layer to a Draw image, but the Draw page on Adobe seems to imply multiple photos can be added. How might I accomplish this? Thanks for your time.

    Unfortunately, Draw is currently limited to one photo layer, and only one photo within that layer.
    Hope that helps,
    Frank
    Draw Engineering

  • Looking for an app where i can draw images then text them?

    Looking for an app where I can draw images then text them?

    Just write Draw into the MAS searchbox in the upper right corner and you will be presented with a plethora of drawing/sketching apps of varying abilities and pricing.

  • Specification to Draw image on a page

    Can any one tell me exact Specification to draw image on a page.

    What don't you understand from the PDF Reference?
    You need an Image XObject and the Do operator in the content stream.
    Leonard

  • How draw image into frame in applet

    How draw image into frame in applet.Please give my simple example code.

    http://search.java.sun.com/search/java/index.jsp?qt=%2Bdraw+%2Bimage+%2Bpanel+%2Bhow&nh=10&qp=&rf=1&since=&country=&language=&charset=&variant=&col=javaforums

  • Blast from the past: How do I draw image maps in Dreamweaver CC 2014?

    Need to update some old stuff, and can´t find where to draw image-maps on images.

    First, you need to be in Design View to get the image map tools to appear.
    Once there, the image map icons should show when you select an image. If they don't, you may have your Properties panel collapsed. In the bottom right corner of the Properties panel, there's a tiny triangle, click that to expand the panel to include the image map tools.

  • Draw image using paint() only once.

    I am having performance issues with my application. It is creates a graph like data display. The display is static. However each time paint is called the image is re-rendered. I want it only rendered once to improve performance, I tried to do this using the following code:
    public void paint(Graphics g){
              if (alreadyRun) return;
              //super.paint(g);
              alreadyRun = true;
    // draw graphics code
    }Unfortunately the required image appears for a moment then disappears. Is there any way to render the image only once? Also, are there any other performance improving measures I can take? I was thinking of rendering only the part of the image that appears on screen (my graphics display is usually bigger than the actual screen size)

    The common way to deal with performance like this is to draw the graph (or whatever) onto a BufferedImage then have the paint (or paintComponent in Swing) simply draw the image. The single draw image is quite fast and keeps the pixel values persistant across paints. If you already have a single image as the thread title hints, the paint shouldn't create much of a performance hit. The reason you are seeing your image disappear is that any time a window is resized, repacked, moved, covered up, or a multitude of other reasons, it calls paint again, so even with static data, there will be times the paint method is called again, causing your drawing to disappear.

  • Drawing images in JComponent

    Hi,
    I have an application laid out as Figure 1 depicts.
    JFrame
    |
    | JMenuBar
    |-----------------------------------------
    | ------------------JPanel - appPanel
    | |--------------------------------|
    | | ---|------------------ JPanel - displayPanel
    | | | |
    | |----------------|---------------|
    | |-------------------------- JComponent - jcanvas
    |
    | |--------------------------------|
    | | ----|----------------------- JPanel - controlPanel
    | | |
    | |--------------------------------|
    |
    |--------------------------------------------
    Figure 1
    The problem I am having is that:
    theJPanel (appPanel) contains two JPanels (displayPanel and controlPanel) and I am adding a JComponent called JCanvas
    to the displayPanel and I use it to draw images on it of type BufferedImage. Now, the image is displayed without any problem
    but when I resize the application (JFrame) I lose my image. I know the JCanvas (JComponent) is being redrawn because I can
    temporarily see the image but something is overwriting the image. I have set appPanel, displayPanel, controlPanel to opaque
    but I still loose the image.
    Of point maybe, if I access the JMenuBar the image will appear less what part of the menu bar obscures it.
    The appPanel, controlPanel, and displayPanel are created in the IDE. Where as, the JCanvas is a seperate class extending JCompoment
    and it has it own paintComponent method to do the image rendering and is added to the displayPanel when instantiated.
    What I don't understand is why isn't the image staying visible after a frame resize?
    Thanks,
    Bob

    Hopefully this will fit.
    You will have to provide your own image file.
    * SwingPaintDemo2.java
    * Created on Sep 27, 2008, 10:57:22 AM
    * Company: 
    * Copyright: Sep 27, 2008
    * Version:
    import javax.swing.SwingUtilities;
    import javax.swing.JFrame;
    import javax.swing.BorderFactory;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.io.IOException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.imageio.ImageIO;
    import javax.swing.JComponent;
    * @author
    public class SwingPaintDemo2 {
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
        private static void createAndShowGUI() {
            System.out.println("Created GUI on EDT? " +
                SwingUtilities.isEventDispatchThread());
            JFrame f = new JFrame("Swing Paint Demo");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.add(new MyPanel());
            f.pack();
            f.setVisible(true);
    class MyPanel extends JComponent {
        BufferedImage bi;
        File file;
        Dimension d = new Dimension();
        boolean fullScreen = false;
        public MyPanel() {
            setBorder(BorderFactory.createLineBorder(Color.black));
            file = new File("g://java/images/dido_img.jpg");
            try {
                bi = ImageIO.read(file);
            } catch (IOException ex) {
                Logger.getLogger(MyPanel.class.getName()).
                    log(Level.SEVERE, null, ex);
        @Override
        public Dimension getPreferredSize() {
            return new Dimension(350, 350);
        @Override
        public void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D) this.getGraphics();
            d = this.getPreferredSize();
            if (d.width == 0 || d.height == 0) {/* error */
            if (!fullScreen) {
                int px = (d.width - bi.getWidth()) / 2;
                int py = (d.height - bi.getHeight()) / 2;
                g2.drawImage(bi, null, px, py);
            } else {
                g2.drawImage(bi, 0, 0, d.width, d.height,
                    0, 0, bi.getWidth(), bi.getHeight(), null);
    }

  • Graphics refuses to draw Images

    I was attempting to make an applet today, but for some reason, I can't draw Images. I had a little program going, but I decided to make this basic test applet to see if Images would draw at all.
    import java.awt.*;
    import java.applet.*;
    public class TestApplet extends Applet
         Image im;
         public void init()
              setSize(300, 400);
              im = getImage(getDocumentBase(), "Picture.GIF");
         public void start()
              repaint();
         public void paint(Graphics g)
              g.drawImage(im, 10, 10, this);
              g.drawString("I can draw a string", 10, 10);
         public void stop()
         public void destroy()
    }The string gets drawn fine, but the image just refuses to show up. Any idea why?
    Message was edited by:
    Guest42

    //  <applet code="TestApplet" width="300" height="400"></applet>
    import java.awt.*;
    import java.applet.*;
    public class TestApplet extends Applet
         Image im;
        public void init()
            setSize(300, 400);
            im = getImage(getDocumentBase(), "Picture.GIF");
            loadImage();
        private void loadImage()
            MediaTracker tracker = new MediaTracker(this);
            tracker.addImage(im, 0);
            try
                tracker.waitForID(0);
            catch(InterruptedException ie)
                System.err.println("interrupt: " + ie.getMessage());
            int status = tracker.statusID(0, false);
            String results = "";
            if((status & MediaTracker.COMPLETE) == MediaTracker.COMPLETE)
                results += "COMPLETE";
            if((status & MediaTracker.ABORTED) == MediaTracker.ABORTED)
                results += "ABORTED";
            if((status & MediaTracker.ERRORED) == MediaTracker.ERRORED)
                results += "ERRORED";
            System.out.println("results = " + results);
        public void start()
    //        repaint();
        public void paint(Graphics g)
            g.drawImage(im, 10, 10, this);
            g.drawString("I can draw a string", 10, 10);
        public void stop()
        public void destroy()
    }

  • How to draw image in different dpi?

    I wonder is there any approach can be used to draw a image in different dpi, such as 144dpi, in a JPanel?
    'cause my image processed from other tools is not good, if I can draw image in a high dpi, then the image will looks much better, though the image becomes smaller.
    Note: no SCALE!

    I have a image which is 152dpi, then, how does the Widows draws this image? It looks much better than scale the 72dpi image to the same size.
    Really puzzled-_-                                                                                                                                                                                                                                                                                                                               

  • Color Matrix Alpha values and drawing images.

    Hi All,
    I am experimenting with using a color matrix to change images and have brightness, R, G, B changing but the alpha does not seem to do anything. I have a scrollbar for the alpha value in the matrix in the example. It seems it should change the image in some
    way but it does not.
    In this example I put 1 for red in the matrix thinking as I moved the scroll bar the alpha transparency would change the image in some way but it does not? It does not matter what colors or image I use nothing seems to happen with alpha? Is it
    only for drawing lines and such or does it do something to images? If so what?
    Imports System.Drawing.Imaging
    Public Class Form3
    Private rustybmp As New Bitmap("c:\bitmaps\rusty.jpg")
    Private Sub Form3_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.DoubleBuffered = True
    VScrollBar1.Maximum = 100
    VScrollBar1.Minimum = 0
    VScrollBar1.Value = 50
    End Sub
    Private Sub Form3_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
    Dim cm As ColorMatrix = New ColorMatrix(New Single()() _
    {New Single() {1, 0.0, 0.0, 0.0, 0.0}, _
    New Single() {0.0, 1, 0.0, 0.0, 0.0}, _
    New Single() {0.0, 0.0, 1, 0.0, 0.0}, _
    New Single() {0.0, 0.0, 0.0, 1.0, 0.0}, _
    New Single() {1, 0, 0, VScrollBar1.Value / 100, 1}})
    Dim image_attr As New ImageAttributes
    image_attr.SetColorMatrix(cm)
    e.Graphics.DrawImage(rustybmp, Me.ClientRectangle, 0, 0, rustybmp.Width, rustybmp.Height, GraphicsUnit.Pixel, image_attr)
    End Sub
    Private Sub VScrollBar1_Scroll(sender As Object, e As ScrollEventArgs) Handles VScrollBar1.Scroll
    Me.Refresh()
    End Sub
    End Class

    I didn't try this.
    How to: Use a Color Matrix to Set Alpha Values in Images
    La vida loca
    Oh, ok, in your link example the alpha is the 4 row 4 col.
    I was using the 5th row 4th col because I thought that was R, G, B A across the 5th row. Maybe that is for a solid brush or something.
    This works as I expected that way. Still looking....
    Dim cm As ColorMatrix = New ColorMatrix(New Single()() _
    {New Single() {1, 0.0, 0.0, 0.0, 0.0}, _
    New Single() {0.0, 1, 0.0, 0.0, 0.0}, _
    New Single() {0.0, 0.0, 1, 0.0, 0.0}, _
    New Single() {0.0, 0.0, 0.0, VScrollBar1.Value / 100, 0.0}, _
    New Single() {0, 0, 0, 0, 1}})
    Cool!
    Now if you could just get that working with HoloLens..... :)
    La vida loca

Maybe you are looking for

  • Need Images To Open Up From Scrollbar

    Hi all. I am trying to get pictures to pop up in a box when the cursor rolls over one of the thumbnails in a scroll bar i have created. i know it is possible because i have seen it on websites before, but am stuck in an area and don't know how to res

  • Zen Vision: M detection prob

    Hi. My ZVM is having some problems in being detected on my computer. What should i do to fix this problem? Plz respond ASAP thanks

  • How do i get letter opener to work

    How do I get letter opener to work on my MacBook Pro?  Just downloaded the app but not sure what the next step is.

  • Configure SSL for Soap to poa

    Currently do not have SSL for soap enabled on my poas. Looking to turn it on and I cannot find any documentation or TIDs in reference to Webaccess. I know where to turn it on in the POA agent, but what do I need to do on the Webaccess server? Looked

  • Adobe Export PDF is having a problem uploading. What can I do?

    The program gets stuck and does not upload the PDF file