Writing on Image
What software do you recommend for a "newby" to put writing on an image? Names on senior pics, little sayings on kids pics, etc? thanks!
Something I've been using for a while to do just that is Picasa. A free Google product. Very easy to use and intuitive, especially for non-technerdy types.
The icon for adding text is quite obvious when you open up the program and double-click onto an image to edit it and to which you wish to apply the text; the menu panel on the left is open in Basic Fixes and there you will see an image with ABC and Text underneath it, and right next to that is also Edit in Picnik, a more sophisticated way to do that. Try that! Let us know how you fare.
Similar Messages
-
How to writing an image from my applet to my apache webserver
hi everyone,
i have a big problem, writing an image from my applet to my apache
webserver. i tried three way's of writing that file. every way was
described in forums to solve this problem, but non of them worked and
i don't know why. i'll give you the code of my writing-methods and
describe, what happen when i test them, in order someone of you can
give me an usefull tip, where the problem is.
as inputparameter i give my method a new URL referring to
http://localhost/test.jpg (this is the same directory, where my applet
is loaded from, so i should have reading and writing permission,
havn't i? while i'm developing, my applet runs on the same pc as my
webserver, just in case you're wondering about localhost) and a
selfmade BufferedImage (i already testet if it is not null and shows
the correct things ... all ok).
1. try:
private void writeImageToServer(URL fileURL,BufferedImage img){
try {
URLConnection urlConnection = fileURL.openConnection();
urlConnection.setDoOutput(true);
OutputStream urlout = urlConnection.getOutputStream();
BufferedOutputStream out = new BufferedOutputStream(urlout);
ImageIO.write(img,"jpg",out);
out.close(); // i also tried without this line -> same result
// additionally a question: do i need
out.close()?
catch( IOException e ){
e.printStackTrace();
result:
test.jpg doesn't appear in the webroot. but some very strange messages
in the error.log of my apacheserver:
[Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
exist: c:/programme/apache
group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageOutputStreamSpi
[Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
exist: c:/programme/apache
group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageReaderSpi
[Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
exist: c:/programme/apache
group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageInputStreamSpi
[Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
exist: c:/programme/apache
group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageWriterSpi
[Tue Jun 08 11:40:22 2004] [error] [client 127.0.0.1] File does not
exist: c:/programme/apache
group/apache/htdocs/meta-inf/services/javax.imageio.spi.ImageTranscoderSpi
i cannot explain this lines to myself, because my apache should have
nothing to do with java. all my javacode is executed on the client
side in the browser. do this messages mean i have to add the ImageIO
package from the sdk to my jar-applet. the jre, used by my iexplorer,
doesn't contain this files in the meta-inf/services directory of
rt.jar, but that's version 1.4.2_03, the same as my sdk, and the
rt.jar contains the corresponding classfiles at javax.imageio.spi. so
i'm realy confused by this messages.
2. try:
private void writeImageToServer(URL fileURL,BufferedImage img){
try {
URLConnection urlConnection = fileURL.openConnection();
urlConnection.setDoOutput(true);
OutputStream urlout = urlConnection.getOutputStream();
BufferedOutputStream out = new BufferedOutputStream(urlout);
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
encoder.encode(img);
out.close(); // same comments as above
catch( IOException e ){
e.printStackTrace();
result:
nothing. no error-messages in the error.log, no exceptions in the
java-console and no test.jpg in the webroot. i searched my whole
harddrives for it: nothing. isn't this the way, the JPEGImageEncoder
works?
3. try:
private void writeImageToServer(URL fileURL,BufferedImage img){
try {
File file = new File(fileURL.toString);
file.createNewFile();
BufferedOutputStream out = new BufferedOutputStream(new
FileOutputStream(file));
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
encoder.encode(img);
out.close(); // same comments as above
catch( Exception e ){
e.printStackTrace();
result:
the SecurityManager denies this action with "access denied" while
calling createNewFile(). well, this way was dedicated to run from an
application, not from an applet. i'd have to sign my applet to get the
rights to do this, or i can edit java.policy on my client, what i
don't want, because i cannot do this on every client, the applet will
run, when i'm finished with it. this brings me to the question: does
anybody know's how to sign my applet and give it full access to the
harddrive and the webserver without paying 400$ to VeriSign for a
commercial CA? i want to do this by myself, without paying anything
and without giving a lot of information to another company.
i would realy appreciate, if someone could give me a hint where i am
wrong or how to do this correct.
thank you very much
[email protected]You hold several misconceptions. The first is that an applet can write to a server without help from the server. That will never work on a real server (though it might work in testing, if the server is on the same PC as the applet). Applets cannot get a File object that points to any place on the server.
If you write a servlet designed for accepting image uploads, the applet can communicate back to that servlet and feed it the bytes of the image. There are other technologies that can replace the servlet, of course (PHP, ASP..) but I mention that because you say you are running Apache - and that is very Java oriented.
For more help on servlets, try the [Web Tier APIs - Java Servlet|http://forums.sun.com/forum.jspa?forumID=33] forum. -
Writing gif image to a word document
I want to write a gif image to a Microsoft Word 2000 file. I used several ways with IO Streams but nothing worked right for me. I know that its quite easy with javax.imageio.* package of j2sdk1.4.0 to write images to files. But the problem is that my hosting plan might not upgrade to the new version of jdk and will not be able to support j2sdk1.4.0 for few months. If somebody can send the code it will be very highly appreciated for 1.3 or earlier jdks.
Please help urgent.
Thanks
Muhammad Salman
[email protected]it's not necessarily to a word file, but if you download the Java Advanced Imaging APIs from JavaSoft, they will work in JDK 1.3 to write out gif files. These optional APIs were replaced by the JDK 1.4 ones.
But to take it one step further, you can do JNI and use COM Activation to load the gif you just wrote out into a word. -
Writing multiple images to one file using ImageIO
I am having trouble saving and reading multiple images from to/from one file. Here is the best i can come up with:
//this is utilizing an ObjectOutputStream because i need to also save some objects to the file
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("C:\\images.dat"));
oos.writeInt(ImageTable.size());
for(int k = 0; k < ImageTable.size(); k++)
ImageIO.write((BufferedImage)ImageTable.get(k), "png", oos);
oos.flush();
//////////////////////////read function/////////////////////////
ObjectInputStream ois = new ObjectInputStream(new FileInputStream("C:\\images.dat"));
int size = ois.readInt();
for(int k = 0; k < size; k++)
ImageTable.add(ImageIO.read(ois));
}What it seems to do is read the first image and then place the marker at the end of the file so each consecutive calls to reading the file end up in either null, -1, or an EOF exception (bleh). Does anyone know how i can do this properly?
The code does run and saves something, although it is hard to tell exactly what it is saving since it is all in png format, it also loads the first image properly.Is it possible to pack the different images in one big image?Conversely, some image formats let you store multiple images in a single image file.
Here's a demo. My results are that I don't have a gif writer, tiff can write sequences (this
is a well-known tiff property), I can trick (?) jpeg into stroring multiple images and I
can't get png to work: three images go in, one comes out.
import java.awt.*;
import java.awt.image.*;
import java.io.*;
import java.net.*;
import java.util.*;
import javax.imageio.*;
import javax.swing.*;
import java.util.List;
public class MultiImageTest {
public static void main(String[] args) throws IOException {
URL url1 = new URL("http://today.java.net/jag/bio/JagHeadshot-small.jpg");
URL url2 = new URL("http://today.java.net/jag/bio/JAG2001small.jpg");
URL url3 = new URL("http://today.java.net/jag/Image24-small.jpeg");
BufferedImage[] images = {ImageIO.read(url1), ImageIO.read(url2), ImageIO.read(url3)};
display(images, "original", 0, 0);
String[] suffixes = {"gif", "jpeg", "png", "tiff"};
int x = 30, y = 20;
for(int j=0; j<suffixes.length; ++j) {
String suffix = suffixes[j];
try {
writeFile(images, suffix);
display(readFile(suffix), suffix, x, y);
x += 30;
y += 20;
} catch (Exception e) {
System.err.println(suffix + ": " + e.getMessage());
static void writeFile(BufferedImage[] images, String suffix) throws IOException {
Iterator ws = ImageIO.getImageWritersBySuffix(suffix);
if (!ws.hasNext())
throw new IOException("no writer for: " + suffix);
ImageWriter w = (ImageWriter) ws.next();
File file = new File("temp." + suffix);
file.delete();
w.setOutput(ImageIO.createImageOutputStream(file));
if (w.canWriteSequence()) {
System.out.println("Using writeToSequence for format " + suffix);
w.prepareWriteSequence(null);
for(int j=0; j<images.length; ++j)
w.writeToSequence(new IIOImage(images[j], null, null), null);
w.endWriteSequence();
} else {
System.out.println("cross fingers for format " + suffix);
for(int j=0; j<images.length; ++j)
w.write(images[j]);
static BufferedImage[] readFile(String suffix) throws IOException {
Iterator rs = ImageIO.getImageReadersBySuffix(suffix);
if (!rs.hasNext())
throw new IOException("no reader for: " + suffix);
ImageReader r = (ImageReader) rs.next();
File file = new File("temp." + suffix);
if (!file.exists())
throw new IOException("no file: " + file.getName());
r.setInput(ImageIO.createImageInputStream(file));
List images = new ArrayList();
for(int j=0; true; ++j) {
try {
images.add(r.read(j));
} catch (IndexOutOfBoundsException e) {
break;
return (BufferedImage[]) images.toArray(new BufferedImage[images.size()]);
static void display(BufferedImage[] images, String title, int x, int y) {
JPanel cp = new JPanel(new GridLayout(1,0));
for(int j=0; j<images.length; ++j)
cp.add(new JLabel(new ImageIcon(images[j])));
JFrame f = new JFrame(title);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(new JScrollPane(cp));
f.pack();
f.setLocation(x, y);
f.setVisible(true); -
Writing Adobe Image Resource Block to a Tiff file
Background :
I am working on a small .NET application which reads the tiff file and performs some metadata related operations on it.
The program works fine with all of the tiff Images that are taken from photoshop. I have recieved a tiff file from the client which does not work with the program.
I checked the metadata info for the file using imagemagik following is the output
Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 6986x3754+0+0
Resolution: 96x96
Print size: 72.7708x39.1042
Units: PixelsPerInch
Type: TrueColorAlpha
Base type: TrueColor
Endianess: MSB
Colorspace: sRGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 8-bit
Channel statistics:
Red:
min: 37 (0.145098)
max: 255 (1)
mean: 215.041 (0.843299)
standard deviation: 48.8483 (0.191562)
kurtosis: 0.845012
skewness: -1.09632
Green:
min: 25 (0.0980392)
max: 255 (1)
mean: 213.399 (0.836859)
standard deviation: 50.853 (0.199424)
kurtosis: 0.908226
skewness: -1.09806
Blue:
min: 21 (0.0823529)
max: 255 (1)
mean: 210.495 (0.825471)
standard deviation: 53.6527 (0.210403)
kurtosis: 0.124965
skewness: -0.929882
Alpha:
min: 64 (0.25098)
max: 255 (1)
mean: 254.948 (0.999796)
standard deviation: 2.56957 (0.0100768)
kurtosis: 2437.44
skewness: 49.3893
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 159.747 (0.626458)
standard deviation: 44.321 (0.173808)
kurtosis: 48.4205
skewness: -8.00071
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Background color: white
Border color: srgba(223,223,223,1)
Matte color: grey74
Transparent color: none
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 6986x3754+0+0
Dispose: Undefined
Iterations: 0
Compression: LZW
Orientation: TopLeft
Properties:
date:create: 2014-02-15T21:18:37+06:00
date:modify: 2014-02-09T16:29:10+06:00
signature: a5c4a9415437ee2d3b0c3d860b30c5367f73fe7553c3f54923caf6da4b9e4623
tiff:alpha: unassociated
tiff:endian: lsb
tiff:photometric: RGB
tiff:rows-per-strip: 3754
Artifacts:
filename: C:\Users\Jane\TiffPathOperation\bin\Debug\Example1client_no_path.tiff
verbose: true
Tainted: False
Filesize: 14.6MB
Number pixels: 26.23M
Pixels per second: 54.64MB
User time: 0.484u
Elapsed time: 0:01.479
Version: ImageMagick 6.8.7-4 2013-10-26 Q16 http://www.imagemagick.org
Unlike other tiff images this image does not contain 8bim profile information, which is required for proper execution of the program
Profiles:
Profile-8bim: 11720 bytes
Profile-icc: 3144 bytes
Description: sRGB IEC61966-2.1
Manufacturer: IEC http://www.iec.ch
Model: IEC 61966-2.1 Default RGB colour space - sRGB
Copyright: Copyright (c) 1998 Hewlett-Packard Company
Profile-xmp: 19368 bytes
Possible solution :
I would have to add the Image resource block data to such image in which the profile information is missing.
Problem :
I would have to write metadata for the tag 34377 as given in the Adobe Specification for the listed resource Id
How am I suppose to write this entire block and assign it to the Tag 34377 in C#?
What values should be added for each resource Id ?
Tiff Image : http://1drv.ms/NtzbCrBypassing the portion of the file is not a option in my case since a part
of the program reads the bytes and performs operation on the image when it
reads 8bim.
The image if re-saved in Photoshop gets the required metadata. (Can be seen
by using imagemagik's identify utility)
Only option that I have is to write the information for the resource in
side the Image resource block tag.
How am I suppose to write this resources when I am using BitmapMetadata
class?
Regards,
Charanraj Golla -
Writing ISO image in CD by using Java.
Hi All,
Can any one knows how can write the iso image in to cd/dvd ky using th e java.
Thanks and Regards,Try asking in one of the media forums.
[http://forums.sun.com/category.jspa?categoryID=9] -
Writing RPi2 image to SD Card: dism Error: 1168 - cannot find element
Hello all,
I have installed Windows 10 build 10074 (Dutch language) on a PC, no VM.
I have downloaded and extracted Windows_IoT_Core_RPI2_BUILD.zip
One of the files extracted is Flash.ffu
I have established that my SD card is a class 10 and 16 GB
I open an Administrator command prompt.
I have established the SD card is seen as "Disk 1" 14 GB size
I change directory to the directory containing Flash.ffu
I execute the command: "dism.exe /Apply-Image /ImageFile:flash.ffu /ApplyDrive:\\.\PhysicalDrive1 /SkipPlatformCheck"
I receive follwing error:
Deployment Image Servicing and Management tool
Version: 10.0.10074.0
Error: 1168
Kan element niet vinden.
The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
> "Kan element niet vinden" translates as : "Cannot find element"
I notice a difference in filename between the extracted "Flash.ffu" and the "flash.ffu" (capital F) so I retry the command as:
"dism.exe /Apply-Image /ImageFile:Flash.ffu /ApplyDrive:\\.\PhysicalDrive1 /SkipPlatformCheck"
but with same error 1168
The DISM log entry follows below.
Anyone encountering the same issue, and better still, have found a solution?
Many thanks!
Ralph
DISM log file entry:
2015-05-02 13:36:06, Info DISM PID=4348 TID=4092 Scratch directory set to 'C:\Users\ralph\AppData\Local\Temp\'. - CDISMManager::put_ScratchDir
2015-05-02 13:36:06, Info DISM PID=4348 TID=4092 DismCore.dll version: 10.0.10074.0 - CDISMManager::FinalConstruct
2015-05-02 13:36:06, Info DISM PID=4348 TID=4092 Successfully loaded the ImageSession at "C:\Windows\System32\Dism" - CDISMManager::LoadLocalImageSession
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Failed to get and initialize the PE Provider. Continuing by assuming
that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Finished initializing the Provider Map. - CDISMProviderStore::Final_OnConnect
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Getting Provider DISMLogger - CDISMProviderStore::GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Provider has previously been initialized. Returning the existing instance.
- CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Getting Provider DISMLogger - CDISMProviderStore::GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Provider has previously been initialized. Returning the existing instance.
- CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Manager: PID=4348 TID=4092 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Getting Provider DISMLogger - CDISMProviderStore::GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Provider has previously been initialized. Returning the existing instance.
- CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM.EXE:
2015-05-02 13:36:06, Info DISM DISM.EXE: <----- Starting Dism.exe session ----->
2015-05-02 13:36:06, Info DISM DISM.EXE:
2015-05-02 13:36:06, Info DISM DISM.EXE: Host machine information: OS Version=10.0.10074, Running architecture=amd64, Number of processors=2
2015-05-02 13:36:06, Info DISM DISM.EXE: Dism.exe version: 10.0.10074.0
2015-05-02 13:36:06, Info DISM DISM.EXE: Executing command line: dism.exe /Apply-Image /ImageFile:flash.ffu /ApplyDrive:\\.\PhysicalDrive1
/SkipPlatformCheck
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Provider has not previously been encountered. Attempting to initialize
the provider. - CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Loading Provider from location C:\Windows\System32\Dism\FolderProvider.dll
- CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Connecting to the provider located at C:\Windows\System32\Dism\FolderProvider.dll.
- CDISMProviderStore::Internal_LoadProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Provider has not previously been encountered. Attempting to initialize
the provider. - CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Loading Provider from location C:\Windows\System32\Dism\WimProvider.dll -
CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Connecting to the provider located at C:\Windows\System32\Dism\WimProvider.dll.
- CDISMProviderStore::Internal_LoadProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Provider has not previously been encountered. Attempting to initialize
the provider. - CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Loading Provider from location C:\Windows\System32\Dism\VHDProvider.dll -
CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Connecting to the provider located at C:\Windows\System32\Dism\VHDProvider.dll.
- CDISMProviderStore::Internal_LoadProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Provider has not previously been encountered. Attempting to initialize
the provider. - CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Loading Provider from location C:\Windows\System32\Dism\ImagingProvider.dll
- CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Connecting to the provider located at C:\Windows\System32\Dism\ImagingProvider.dll.
- CDISMProviderStore::Internal_LoadProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Provider has not previously been encountered. Attempting to initialize
the provider. - CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Loading Provider from location C:\Windows\System32\Dism\CompatProvider.dll
- CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Connecting to the provider located at C:\Windows\System32\Dism\CompatProvider.dll.
- CDISMProviderStore::Internal_LoadProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Provider has not previously been encountered. Attempting to initialize
the provider. - CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Loading Provider from location C:\Windows\System32\Dism\FfuProvider.dll -
CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Connecting to the provider located at C:\Windows\System32\Dism\FfuProvider.dll.
- CDISMProviderStore::Internal_LoadProvider
2015-05-02 13:36:06, Info DISM DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.
2015-05-02 13:36:06, Info DISM DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
2015-05-02 13:36:06, Info DISM DISM.EXE: Attempting to add the commands from provider: FolderManager
2015-05-02 13:36:06, Info DISM DISM.EXE: Attempting to add the commands from provider: WimManager
2015-05-02 13:36:06, Info DISM DISM.EXE: Succesfully registered commands for the provider: WimManager.
2015-05-02 13:36:06, Info DISM DISM.EXE: Attempting to add the commands from provider: VHDManager
2015-05-02 13:36:06, Info DISM DISM.EXE: Attempting to add the commands from provider: GenericImagingManager
2015-05-02 13:36:06, Info DISM DISM.EXE: Succesfully registered commands for the provider: GenericImagingManager.
2015-05-02 13:36:06, Info DISM DISM.EXE: Attempting to add the commands from provider: Compatibility Manager
2015-05-02 13:36:06, Info DISM DISM.EXE: Succesfully registered commands for the provider: Compatibility Manager.
2015-05-02 13:36:06, Info DISM DISM.EXE: Attempting to add the commands from provider: FfuManager
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Getting Provider GenericImagingManager - CDISMProviderStore::GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Provider has previously been initialized. Returning the existing instance.
- CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Getting Provider FfuManager - CDISMProviderStore::GetProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Provider has previously been initialized. Returning the existing instance.
- CDISMProviderStore::Internal_GetProvider
2015-05-02 13:36:06, Error DISM DISM Imaging Provider: PID=4348 TID=4092 base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:2546
- CGenericImagingManager::InternalCmdFFUApply(hr:0x80070490)
2015-05-02 13:36:06, Error DISM DISM Imaging Provider: PID=4348 TID=4092 base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:535
- CGenericImagingManager::ExecuteCmdLine(hr:0x80070490)
2015-05-02 13:36:06, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.
2015-05-02 13:36:06, Info DISM DISM.EXE:
2015-05-02 13:36:06, Info DISM DISM.EXE: <----- Ending Dism.exe session ----->
2015-05-02 13:36:06, Info DISM DISM.EXE:
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Found the OSServices. Waiting to finalize it until all other providers
are unloaded. - CDISMProviderStore::Final_OnDisconnect
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Disconnecting Provider: WimManager - CDISMProviderStore::Internal_DisconnectProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Disconnecting Provider: VHDManager - CDISMProviderStore::Internal_DisconnectProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Disconnecting Provider: GenericImagingManager - CDISMProviderStore::Internal_DisconnectProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Disconnecting Provider: Compatibility Manager - CDISMProviderStore::Internal_DisconnectProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Disconnecting Provider: FfuManager - CDISMProviderStore::Internal_DisconnectProvider
2015-05-02 13:36:06, Info DISM DISM Provider Store: PID=4348 TID=4092 Releasing the local reference to DISMLogger. Stop logging. - CDISMProviderStore::Internal_DisconnectProviderSame problem here.
- I tried with two different SDcard readers - no difference.
- I tried with different / bigger card - no difference. -
N8 user read/writing camera images
A user application can read images in memory from: F:/Images/Camera/yyyymm/yyyymmA0/ but can it write to an existing image, and can a user program delete an image from this directory. My current tests indicate this is not possible. Can anyone confirm? Thanks,
Hey Andy,
I have taken a look at your code I have some feed back to give you:
We do not tend to use the producer consumer architecture with vision applications, as we are not buffering data into a queue. With a standard DAQ task we will have data which we can queue up, with vision we have pointer to a memory location, so if we used producer consumer we will be queueing up pointers of the same memory location. If we do have references in the queue our time stamp will not match to the image (defeats the purpose of the queues) as the image in memory would have changed by the time that element is dequeued.
However I have stuck with your architecture, but just an air of caution if the consumer loop is slower than the producer all your images and time stamps will be incorrect.
The data that you have enqueued is not an image (frame) but is a reference to that image. The image is stored in a temporary memory location which is created with IMAQ create.
Therefore this reference is enqueued and passed down the queue. If the reference has been updated with a new frame, then when the reference is dequeued it will dequeue whatever is currently in the temporary memory location, i.e. the latest frame. This can be avoided by slowing down the producer loop so the consumer loop has enough time, to read the temporary memory location before it is updated.
You can check this by adding a “get queue status” to the consumer loop to see how many elements are left in the buffer. Ideally this should be 0.
You can use the time stamp to pull the time and date, instead of using the tick clock. It is a more elegant way to get the time data.
For more accurate timing you will need to use a real time or FPGA system, as the windows OS is not a real time system, it will have other tasks running in the back ground that will not give you accurate timing.
Kevin R
Applications Engineer
National Instruments UK&Ireland
Attachments:
cam.vi 557 KB -
Writing Image files from Applet to Servlet
How to write ImageFiles from an Applet to a Servlet?
I draw a image on a JComponent in Applet and wanted to save the image file in the server.
I am unable to write an Image Object to the Servlet as the BufferedImage class is not serialized.
I tried writing the image to the Servlet output stream and tried reading the data in the servlet and writing the data to a jpg file.
But the files is not being written as proper jpeg file.
Any help would be great.
Thanks,
Sridhar.I get the following exception below when i try to write a Serialized object from an applet to the servlet.
I copied the serialized class jar file to the tomcat webserver lib folder.
The serialized class has a BufferedImage object.
Serialized Class Code
public class SerializedImage implements Serializable{
private BufferedImage im = null;
public SerializedImage() {
super();
public BufferedImage getSerializedObject() {
return im;
public void setSerializedObject((BufferedImage im) {
this.im = im;
private BufferedImage fromByteArray(byte[] imagebytes) {
try {
if (imagebytes != null && (imagebytes.length > 0)) {
BufferedImage im = ImageIO.read(new ByteArrayInputStream(imagebytes));
return im;
return null;
} catch (IOException e) {
throw new IllegalArgumentException(e.toString());
private byte[] toByteArray(BufferedImage o) {
if(o != null) {
BufferedImage image = (BufferedImage)o;
ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
try {
ImageIO.write(image, "jpg", baos);
} catch (IOException e) {
throw new IllegalStateException(e.toString());
byte[] b = baos.toByteArray();
return b;
return new byte[0];
private void writeObject(java.io.ObjectOutputStream out)
throws IOException {
byte[] b = toByteArray(im);
out.writeInt(b.length);
out.write(b);
private void readObject(java.io.ObjectInputStream in)
throws IOException, ClassNotFoundException {
int length = in.readInt();
byte[] b = new byte[length];
in.read(b);
im = fromByteArray(b);
Exception :
java.io.StreamCorruptedException: unexpected block data
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1288)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:18
45)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
646)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
Is there any thing that i am missing or doing wrong?
Thanks,
Sridhar. -
Image select, resize and locally store (flex3 air example)
Hi there,
After a few days of struggling with images, resize functions
and file dialog boxes I created a nice example application that
shows how you can select an image, resize it and save the resized
image in the application storing directory.
I hope you can profit from it.
Greets, jacob
example code for flex 3 air.
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import mx.graphics.codec.PNGEncoder;
public var imageFile:File;
public var fileresultimage:Object;
public var fileresultlabel:Object;
// File.applicationStorageDirectory gets you to the local
storage dir
//On Windows, this is the "projectname" directory
//(for example, C:\Documents and Settings\application
data\projectname).
// On Mac OS, it is /Users/userName/Documents.
public var docsDir:File = File.applicationStorageDirectory;
public function
imageFileDialog(image:Object,label:Object):void
fileresultimage=image;
fileresultlabel=label;
var imagesFilter:FileFilter =
new FileFilter("Foto (*.jpg, *.gif, *.png)",
"*.jpg;*.gif;*.png");
if(imageFile==null)
imageFile = new File();
imageFile.addEventListener(Event.SELECT, imageSelected);
imageFile.browseForOpen("Select an Image",[imagesFilter]);
// if there is a file selected
public function imageSelected(event:Event):void
var newFile:File = event.target as File;
//if there is a file object on the screen
if(fileresultimage!=null)
fileresultimage.source=imageFile.url;
//if there is a label object on the screen
if(fileresultlabel!=null)
fileresultlabel.text=imageFile.url;
if (newFile.exists==true)
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
handleImageComplete);
loader.load(new URLRequest(imageFile.url));
// when load of the selected image is complete we save a
smaller version of it.
public function handleImageComplete(event:Event):void
var loader:Loader = Loader(event.target.loader);
// width and heigt of selected image
var originalimgwidth:Number=event.target.width;
var originalimgheight:Number=event.target.height;
//put original image into bitmapdata
var bitmapje:BitmapData;
bitmapje=new BitmapData(originalimgwidth, originalimgheight,
true, 0x00000000);
//bitmapje.draw(loaderInfo.loader.content,null,null,null,null,true);//null
object reference
bitmapje.draw(loader.content,null,null,null,null,true);
// call the resize function and give the original
image,maxx,and maxy with it.
var thumb:BitmapData=resizeimage(bitmapje,150,150);
var newimagefile:File=new File();
// T = Thumbnail
// 1 = next id in the db
// for now we use a random number
var random:Number= Math.random();
random = Math.ceil(random*100);// to get a positive number
var filenameForSave:String="T"+random; //new filename;
newimagefile=docsDir.resolvePath("Thumbs/" + filenameForSave
+ ".png"); //image path
var stream:FileStream = new FileStream; // create new
filestream
stream.open(newimagefile, FileMode.WRITE); // open
filestream
var data:ByteArray = encodeToPng(thumb); // convert
bitmapdata to a png bytearry
stream.writeBytes(data, 0, data.length); // writing the
image
stream.close();
// show the saved thumb
savedthumb.source=newimagefile.nativePath;
bitmapje=null;
thumb=null;
// resize function
private function
resizeimage(image:BitmapData,maxx:Number,maxy:Number):BitmapData
var bmp:BitmapData =image;
var true_width:Number = bmp.width;
var true_height:Number = bmp.height;
var resize:Boolean=false;
if (true_width>maxx) resize=true;
if (true_height>maxy) resize=true;
if (resize==true)
var width:Number=maxx;
var height:Number = (width / true_width) * true_height;
true_width=width;
true_height=height;
if (true_height>maxy)
height=maxy;
width = (height/true_height)*true_width;
else
width=true_width;
height=true_height;
else
width=true_width;
height=true_height;
//new calculated width and heigt relative to the given maxx
and maxy.
width=Math.ceil(width);
height=Math.ceil(height);
//create a new image object with the calculated widht and
height for the smaller image
var mysmallimage:Image=new Image();
mysmallimage.width=width;
mysmallimage.height=height;
//new matrix for smaller image
var m : Matrix = new Matrix() ;
//scale the matrix to the correct sizes.
m.scale( mysmallimage.width / bmp.width, mysmallimage.height
/ bmp.height ) ;
//draw the image into the image object
mysmallimage.graphics.beginBitmapFill( bmp, m, false, true )
mysmallimage.graphics.drawRect( 0, 0, mysmallimage.width,
mysmallimage.height ) ;
mysmallimage.graphics.endFill();
//put the smaller image into bitmapdata so it can be
returned.
var littlebitmapdata:BitmapData=new
BitmapData(mysmallimage.width,mysmallimage.height,true,0x00000000);
littlebitmapdata.draw(mysmallimage);
// set the temporary small image to null so the GC can
remove it from the memmory.
mysmallimage=null;
bmp=null;
//returning the small image.
return littlebitmapdata;
// encoder to png
private function encodeToPng(bmd:BitmapData):ByteArray
var png:PNGEncoder= new PNGEncoder();
return png.encode(bmd);
]]>
</mx:Script>
<!--<mx:Image id="tempimage" x="404" y="36"
complete="temploadcomplete()"/>-->
<mx:Image id="myimg" x="10" y="55" width="314"
height="227" verticalAlign="middle" horizontalAlign="center"/>
<mx:TextInput id="imageurl" x="53" y="303" width="160"
maxWidth="160"/>
<mx:Button x="221" y="303" label="Bladeren"
click="imageFileDialog(myimg,imageurl)"/>
<mx:Image x="346" y="55" id="savedthumb"/>
<mx:Text x="23" y="0" text="Original image with limit
width and height to show it on the screen." height="47"
width="177"/>
<mx:Text x="346" y="0" text="Local stored thumbnail"/>
</mx:WindowedApplication>
To bad the attach code button still isn't fixed :(Hi there,
Will you be able to provide the backend script for saving the
file data?Will you be able to provide the backend script for saving
the file data?
This example is created for a desktop application. Saving the
file is included in this example, it saves in the application
storage directory.
// File.applicationStorageDirectory gets you to the local
storage dir
//On Windows, this is the "projectname" directory
//(for example, C:\Documents and Settings\application
data\projectname).
// On Mac OS, it is /Users/userName/Documents.
If you attempt to use certain functionality in a website, you
need other functionality for storing the image on the server. There
are lots of examples on that one.. Perhaps i need it in the future.
If i do i will post an example on the forum.
Also, may I post your link to other forums, so that others may
benefit?
Sure you may post the example on other websites and forums.
I found it difficult to find nice examples, so the more the
better ;)
Just put underneath the example something like:
Created By: Jacob Hingst From Holland
No copyright attached, so free for your use. -
Appending data(Image and Text) to a file written with RTFWriter2.
I have file witten using RTFWriter2 which contains image and text.I nedd to modify the contents of that file at runtime through browsing and selecting the JFileChooser and append the data to existing selected file.
I write inot the file for the first time using FileOutputStream("filename",ture)
where true stands for appending data to current file,if does noes have any/not.
But this does not work when i write the file using RTFWriter2,and i have to use this RTFWriter2 b'coz writing an image to a file is not done by any other way.
If there is any do let me know and if not then what is the solution to this problem of appending data to existing file written by RTFWriter2.
Your repkeis will be appreciated.Thank You.Mubin_Ahmed wrote:
Hi,
I want to write an application which can be used to read a file that contains both images and text.
It must separate the images and text and write them in separate files..
Can anyone help me with this please...
My email id is [email protected]
Thanks in advance...This forum is to use as a resource for your questions, not a place to enlist someone to program for you. If you have specific questions on what to do, not: "I've not a clue, so explain the wold to me." But specific questions on how to get your code to work or points about Java, then people from all over the world will be happy to help you in the context of the forum, and not through your private e-mail. E-mail defeats the basic purpose of having public forums for learning and exchange of information. -
Hi,
I am reading image from client system using the below code
CLIENT_IMAGE.READ_IMAGE_FILE(v_rd_file_name, 'JPG', 'CTRL_BLK.ADD_IMAGE');
But this image is not displaying in the image item, this is happening for some particular images only. While writing this image into image server image size also increasing.
We are trying one image that dimension is 2900 X 4700 this is not uploading to image item.
but i am able to upload less than 2000 X 2000 dimension to the same image item
below is Image item property
Image Format : TIFF
Image Depth : Original
Display Quality : Medium or High
Sizing Style : Adjust
Any idea on thie problem...
Regards,
Suresh.Vhi
What about Java Bean????
try the following link i hope it will help u.
http://forms.pjc.bean.over-blog.com/article-7109292.html
and also u may use Irfan viewer to resize the image.Did u try to use Crop?
sasrah -
Loading an image in the background and displaying it as it is loaded
Hi,
I'm writing an "image viewer" swing component, which should load an image in the background, and display it as it is loaded (for example each time a line of the image is loaded, display it)
Is there a way to do this using JAI or any other api ?
I guess i would need a way to check the loading progress from the EDT, get the loaded part of the image and display it. Am I right ? Is that possible ?
Thanks,
NicolasIn the video inspector set the Spatial Conform to "none". This will give tou the actual size of the image in the viewer. You can then use the transform controls to adjust the image to what you want to see.
-
PS CS6 trial crashes after importing huge image from scanner
Hi.
Here is my hardware:
Macbook pro 4 GB DDR3 core i5 with plenty of HD space
Epson V700 scanner (6400 dpi scanning capability)
My Software:
Adobe CS6 trial
What I want to do:
Scan a typical photo that is 6 by 6 inches at 6400 dpi as a bitmap, for utmost quality
What I tried:
File -> Import -> Images from device -> then selected my scanner, set it to scan at 6400 dpi and save as a bitmap
My problem:
When the scanner head is done scanning and the progress bar for scanning the image completes and moves to the next step (presumably writing the image to the file), PS crashes and gives me an error log. It is far too detailed for me. I have no problem scanning images at lower resolutions like 1200 dpi. But this scanner is capable of 6400 dpi and I want to take full advantage of it. I cannot use the scanner software that came with teh scanner because tech support told me the scanner software has a 1.something GB file limit size. They told me 3rd party software like PS should be able to scan unlimited file sizes.
I suspect the file size migh be too large (16 GB)
My question:
Is this a bug in the trial or something? Should PS be able to scan a 6 by 6 inch photo at 6400 dpi and save it as a bitmap?
Any 1st thoughts? I imagine it would be useful to upload the error log. I can do that if it is ok to do so
Thanks, your help is appreciated since I would lik eto scan this image at 6400 dpi. If I am given a solution, I will probably buy the full versionThat's a bigger image than photoshop elements can handle (the pixel dimensions are roughly 38,400 x 38,400)
I suspect the problem in cs6 is more due to lack of ram on your machine (compared to the file size), but you should really ask about cs6 on the photoshop forum:
http://forums.adobe.com/community/photoshop/general
Also unless the photo is a slide or negative, you probably don't need to scan at max resolution.
Anyway for elements you'd need to reduce either the dpi or specify a smaller size than 6 x 6.
And then probaly scan (save) to your hard drive instead of scanning from within elements to a file format such as tif with compression if the scanner offers that option.
It depends on what your scanning, but for example i usually scan 35 mm slides at 4800 dpi (different scanner) at there default size (24mm x 36mm) and the file size is usually in the 200 to 300 mb range.
Message was edited by: R_Kelly -
Avi file does not have the same resolution as image file?
I'm using LabView with an IEEE-1394 camera and I set up the camera to record at a resolution of 1280 x 960 and can snap images and save them at that resolution from Measurement and Automation Explorer, but when I record avis using LabView, they have a resolution of 720 x 480 even though the images being written to the avi are 1280 x 960. I have had this same problem trying to make new videos from the original in which I extract a part of the image and write it to a new avi file... even though the extracted image is something like 620 x 300, when I play the avi (or get avi info), it says the avi has resolution of 720 x 480. I've tried creating an IMAQ, then using the set image size sub-VI to set the image to the size I want and the image shows up with the right resolution but the resulting avi has the wrong resolution, so my sub-videos are distorted. Is there some way to set the resolution of the avi other than by writing an image of that resolution? I'm using the compression filter DV Video Encoder... would that make any difference?
Thanks!
KellyHey Kelly,
As far as the different codecs that are available, it all depends on what type of filter you want to use. They vary so widely that it is hard to say that one is better than another. Also, it depends on what type of compression that you want to use will also determine which codec you will want. Some use lossy compression and some use lossless compression. With lossy, you will lose some data when it compresses, but lossless will not. Lossless on the other hand will produce large data files, as it can only compress a certain amount without losing data.
One thing that you might want to consider is using some of the Vision functions to track changes in pixel values from one image to the next. There are a lot of different processing that you can do on your images before you store them to file by using the NI Vision functions. Other than that, you might have to just play around with the different codecs to find which one will work best for you.
Let me know if you have any further questions or concerns. Thanks, and have a great day.
Regards,
DJ L.
Maybe you are looking for
-
Apple Hardware Test v2.0.1
Hi, i need the Apple Hardware Test v2.0.1 for my Power Mac G4 dual 1,42 FW800. How can i get this? tom
-
For Netflix, is ethernet cable best?
my new apple tv sits right next to my modem/AES base station. right now i have it wired in via a cat6 cable, thinking that this would be faster than wifi for netflix streaming. is this the case, or does it not matter?
-
Is it Possible to create custom Object type in configuration Tab
Hi , We have object type for table in Development Tab in SOLAR02 , is it possible to create a custom object type to represent the table object type in Configuration Tab. Please let me know the steps , if it is possible. Best Regards, Saravana
-
Amendment to Datasource using Function Module
Alright Guys, Can someone help me? I have amended the '0PU_IS_PS_43' datasource and I need to 'unhide' the new fields I have added. I have logged into trans RSO2 to unhide these fields, but received the following warning - how do I resolve this? "Dat
-
I have sufficient memory on my computer but keep on getting error 101 and I am unable to download.