1,535 Topics
| |
import javax.swing.JPanel; import javax.swing.ImageIcon; import java.awt.Image; import java.awt.Graphics; import java.awt.Graphics2D; class View extends JPanel { Image icon1,icon2; public View(){ ImageIcon i1=new ImageIcon(this.getClass().getResource("tile1.png"));//image I drew ImageIcon i2=new ImageIcon(this.getClass().getResource("tile2.png"));//image I downloaded icon1=i1.getImage(); icon2=i2.getImage(); } public void paint(Graphics g){ super.paint(g); Graphics2D g2=(Graphics2D)g; g2.drawImage(icon1,10,10,null);//this image is not displayed g2.drawImage(icon2,200,200,null);//this image is displayed } } … | |
For some days I have been trying to optimize an image processing program (cropping, rotate, changing brightness and undo) written in c# 4.0. Getting suggestions from google I have optimized the code in many ways. At first some disposable objects hadn’t been disposed that’s why exception was shown. But I … | |
Hey everyone, Does anyone know of any good JavaScript 3D charts? I found a Pie chart that works pretty nicely (http://keith-wood.name/gChart.html), but now looking for a 3D bar chart. Thanks, Cassie :) | |
Does anyone know the process of DCT in relation to image watermarking? Finding it hard to understand the process any help would be appreciated. | |
Is it necessary to compress the host image after embedding the watermark?My host image (512 x 512) is bmp and the watermark is a binary image (63 x 63). | |
I have the following problem passing coordinate data from a web page to a php handler that will read and write the data to a storage file or a database. What I am asking the user to do is click on a line (a png image) which has attributed coordinates … | |
| I made a creature composed of shapes in a Java Applet. I want to basically copy and paste the creature I made so I have say 7-8 copies on the same applet. but in different locations. Is there an easy way besides copying the entire code, and moving each coordinate … |
hi, I'm currently building a game and stuck at the paintComponent method. I'm trying to add 3 graphic buttons to the JPanel but the paintComponent does not execute (all I get is gray window) here's my code : public class TwinMoonTowers extends JPanel implements ActionListener{ private class TMTMenu extends MouseAdapter{ … | |
The first step in image watermarking using DCT is to divide the image into 8 x 8. My question is do I have to divide the image as a whole or divide them by RGB channels so that for each channel I will divide them by 8x8. Any comments will … | |
Hello everyone and good day!!! I'm trying to embedd an image watermark to another image for copyright protection and I plan to use DCT and embedding the watermark in the middle band coefficeint of the host image. The problem is I don't know which of the formulas to use since … | |
I'm curios what happens to the size of the host image after an invisible watermark has been inserted. I'm guessing the size will increase but by how much? For example, the cover image to be inserted is 1kb and the host image is 2kb. Since your adding additional information the … | |
i am trying to make an image align to be vertically centered. As it works perfect in all browser except IE7 . I already tried a lot. here is my css and div. .vertical_align_center{ background: none repeat scroll 0 0 #FFFFFF; display: table-cell; height: 209px; line-height: 209px; margin: 4px; text-align: … | |
Hi all, I have a simple OpenGL program (learnt from NeHe of course) and I've tried to implement GLSL shaders into my program. Currently, its meant to draw a cube with a shader and quit on escape. However, at the line **`GLenum program = glCreateProgramObjectARB();`** it stops responding and closes. … | |
Hi, I got an image with 2 colors, black (background) & white (text color), text is "A B C D" I have extracted the white pixels locations, & now I want to figure out the alphabets that are written in this image. Kind of like a screen reader does. I … | |
How do i insert this into my sql database? I have tried a few things like putting the array bracks on the upload file. when i do this it saves the image location but doesnt upload the image. This is my upload snippet for ($i=0;$i<4;$i++) { if($_FILES['userfile']['name'][$i]) { $uploadfile = … | |
Which of the two (Binary Image and Gray scale image) is easier to embed in a color image using Discrete Cosine Transform? I'm currently exploring image watermarking using discrete cosine transform. Thanks in advance!!! :) | |
Is it possible to embed a colored image to another image using DCT? or does DCT support embedding gray scales and binary formats only? | |
Hi, working on a piece of code which loads in two images, one is a scrambled version of the other, compares them and then attempts to make a new image from the scrambled version. So far I've got it making a new image, comparing and unscrambling most of it, just … | |
Hi all I would like to display several charts on a webpage. I have designed a class that would draw each chart using GD and based on data set by a public method. Unfortunately instead of charts being drawn I get an error message: The image ... cannot be displayed … | |
Hi, This might sound stupid, but "please" cope with me. I got an image in jpg format which I want to read in an array or something (not sure) I only want the bytes of the image, not the headers, size, thumb etc. Basically what I'm trying to do is: … | |
Per the title, I'm trying to figure out a way to restrict the boundaries of mouseClicked. I have an image that moves across the screen. When I click on it, it alternates with another image. However, I only want it to alternate when I click within 30 pixels of its … | |
Hello Daniweb! I'm an amateur programmer who's learned quite a bit from online references, and usually searching eventually reveals the problem but I'm stuck! I've overcome many obstacles when creating a custom button on the Ajax Editor control, namespace issues, registring the controls properly etc. I resist the temptation to … | |
Ello, Firstly let me preface this with the fact that I'm absolutely hopeless at ASP.net. I know the basics, but that's it. Right, I'm trying to fix a property site coded in ASP.net. On the property landing page, there is a small gallery of thumbnail images below a larger one … | |
Hello Daniweb! I'm an amateur programmer who's learned quite a bit from online references, and usually searching eventually reveals the problem but I'm stuck! I've overcome many obstacles when creating a custom button on the Ajax Editor control, namespace issues, registring the controls properly etc. I resist the temptation to … | |
So I have not generated the event for the picturebox but lets say the picture box is "private void pictureBox2_BeverageItems" followed by curly bracelts . I have been looking all over and couldnt find a correct implementation my guess is to probably use "streamreader" but im still fairly new to … | |
Hey guys, I'm making a project on Image processing in C# and I have successfully implemented other controls like zooming,filters,grayscale etc. All these controls happen when user clicks a menu item. Now I'm stuck on how to skew an image in a picturebox. Please explain by taking a simple example … | |
I have a project on image processing. I have a picturebox with an image loaded in it via a openfiledialog box. I was trying to zoom an image in the picturebox by certain pecentage i.e **50%, 100% 150%** and **200%** . All this is done when a user clicks on … | |
I've got a game, and I'm trying to do it right. I've got a spritesheet (which is really just a class that loads images for easy access. It seems to work, but then my tile system starts, and it fails in an interesting way - it loads only the foreground, … | |
I want to display image from database to my htnl form but it id not displayed. Image copied from database to local c:\file_upload folder but from this folder i want to display in img src in html form .project doesn't give any error but image not displayed on html form. … | |
Hi guys, Does anyone have an idea of a jquery plugin any other js plugin for editing and saving an image? I wanted to do something like this: [http://www.customink.com/lab/?#shared](http://www.customink.com/lab/?#shared) But only with option to add text and afterwards saving the image. Any help? Cheers |
The End.