|
hi frnds
can anyone there help me out for placing an audio instead of text in an image plz help me out
|
|
|
|
|
Try using Liquid Nitrogen
Panic, Chaos, Destruction.
My work here is done.
or "Drink. Get drunk. Fall over." - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
|
|
|
|
|
Hi,
the correct term is steganography. Google knows about it, and CodeProject hosts several articles about it.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
I am not Much sure about it but suggesting you to navigate this link[^] to know abut stenography in details
|
|
|
|
|
import java.awt.*;
public class NewClass2 {
public static void main(String args[]){
Image image = Toolkit.getDefaultToolkit().getImage("file:///D:/usage/a.JPG") ;
int width = image.getWidth(null);
int height = image.getHeight(null);
System.out.println("height"+height);
System.out.println("width"+width);
}
}
while executing this code we doesn't get any error, but we cant get the image
Instead we get the width and height is -1;
|
|
|
|
|
Please use code block tags for your code.
|
|
|
|
|
import java.awt.Image;
import java.awt.Toolkit;
public class NewClass2 {
public static void main(String args[]){
Image image = Toolkit.getDefaultToolkit().getImage("D:/usage/a.JPG") ;
int width = image.getWidth(null);
int height = image.getHeight(null);
System.out.println("height"+height);
System.out.println("width"+width);
}
}
...simlpy because the image is not found. I have changed the path String.
Image java.awt.Toolkit.getImage(String filename)
getImage
public abstract Image getImage(String filename)
Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG. The underlying toolkit attempts to resolve multiple requests with the same filename to the same returned Image.
Since the mechanism required to facilitate this sharing of Image objects may continue to hold onto images that are no longer in use for an indefinite period of time, developers are encouraged to implement their own caching of images by using the createImage variant wherever available. If the image data contained in the specified file changes, the Image object returned from this method may still contain stale information which was loaded from the file after a prior call. Previously loaded image data can be manually discarded by calling the flush method on the returned Image.
This method first checks if there is a security manager installed. If so, the method calls the security manager's checkRead method with the file specified to ensure that the access to the image is allowed.
Parameters:
filename - the name of a file containing pixel data in a recognized file format.
Returns:
an image which gets its pixel data from the specified file.
Throws:
SecurityException - if a security manager exists and its checkRead method doesn't allow the operation.
See Also:
createImage(java.lang.String)
--------------------------------------------------------------------------------
int java.awt.Image.getWidth(ImageObserver observer)
getWidth
public abstract int getWidth(ImageObserver observer)
Determines the width of the image. If the width is not yet known, this method returns -1 and the specified ImageObserver object is notified later.
Parameters:
observer - an object waiting for the image to be loaded.
Returns:
the width of this image, or -1 if the width is not yet known.
See Also:
getHeight(java.awt.image.ImageObserver), ImageObserver
regards
Torsten
I never finish anyth...
|
|
|
|
|
How to use GATE (http://gate.ac.uk) for the article in the address, the address of the form:
'Christopher De Forest
8042 NE Rim Trl
Wilmington, DE 19878
(302) 921--2362 ',
or there is no similar Class Code implement the function?
Thank you!
|
|
|
|
|
Since you know the website that supports this product, that would be the best place to ask for help.
I must get a clever new signature for 2011.
|
|
|
|
|
|
i was looking for my java project classes(compiles .class file), and out of curosity i clicked on my connection class,
and was shocked to see that the connection was visible in that, i mean any other coder can clearly see that and break my DB security..... so how can i encrypt this connection string key, any suggestions...
Regards
Alok sharma
Rome was not built in a day...
|
|
|
|
|
encrypt/decryt the String - or add some obfuscation[^] to the complete code - that's probably the best solution.
regards
Torsten
I never finish anyth...
|
|
|
|
|
encrypt string will do fine but how to achieve it in java code, i am more .net friendly then java.
Regards
Alok sharma
|
|
|
|
|
|
I am not sure how much information you have in your code but from your comments it would suggest it includes a password. In such cases you should not include this information in the classs but add it at run time from input by the user.
I must get a clever new signature for 2011.
|
|
|
|
|
yes actually the password/user name is there in my .class file for dbconnection thats what i want to hide.
Regards
Alok sharma
modified on Friday, February 4, 2011 7:48 AM
|
|
|
|
|
This is still he wrong way to do it since anyone can then run your program and get access. As I said before you should obtain this information from the user and then add it to the string to connect to the database; so if the user does not know the password then access to your code will be of no use.
I must get a clever new signature for 2011.
|
|
|
|
|
Alok sharma ji wrote: any suggestions...
You start by actually defining the problem domain.
For example is this a server application or a client app?
Is the server app installed on a server that isn't secure?
If it is secure then what is your concern about access to the server app?
What happens if I get on the machine running this and reverse your class and then replace it with one of my own. So after you unencrypt it my class writes it out to the hard drive for me?
What database do you use? MS SQL Server has a user authentication mode - no password. Pretty sure Oracle does as well.
|
|
|
|
|
what about small client apps with ms-access or mysql, also i have obfuscated my code but still an encryption will be good, although there is no guaranty of 100% security of code, i still wants to manage as much as i can.
Regards
Alok sharma
|
|
|
|
|
How many times do I have to repeat this: "Don't put passwords in your programs."? If a function needs a password (or any secure information) then you should always ask the user for it. That is the only way to ensure the security and integrity of your system.
I must get a clever new signature for 2011.
|
|
|
|
|
Alok sharma ji wrote: what about small client apps with ms-access or mysql, also i have obfuscated my code but still an encryption will be good, although there is no guaranty of 100% security of code, i still wants to manage as much as i can.
That doesn't tell me anything.
For example say you want to write an app that plays mp3s and keeps user information about them. That would be a "small client app" and it it absolutely pointless to worry about security in that case.
Or perhaps you are writing a custom viewer for a database in a credit card processing center. In that case look into using a database protocol (connection) that doesn't require a user at all - the user credentials of the user using the app is used automatically.
Or you write a multiplayer game the communicates with a server - then you shouldn't have database code in the client app at all. Rather it should be in the server app only.
The other suggestion about the user typing a password can be useful too. However you must then consider what happens if the user forgets the password. Or, for a small business app, what if the the only employee with the password dies or is fired? The specifics of the business must dictate if you have a way to fix that problem or if you insist that the business is responsible for that themselves.
There are some simple tricks which might be suitable. One is to break the password into pieces (two strings) and separate from the connection string. Another is to do a simple encryption of the password. Put the encrypted value in the code and then decrypt for usage. It isn't secure from anyone that can code but it does prevent the casual explorer from finding it.
Finally note that the password provides access to the database. It doesn't protect the data in the database itself. To do that you must encrypt the data itself.
|
|
|
|
|
thanks for the info, i was really worried about db and the data in it.
|
|
|
|
|
|
I don't see any Java code here; is this really a Java question?
I must get a clever new signature for 2011.
|
|
|
|
|
try without / and cannot say much without true code snipptes........
|
|
|
|