Here is a function to read preview images from active catalog
--- Get a preview image corresponding to specified photo, at the specified level, if possible.
-- @param photo (LrPhoto or table of param, required) specified photo or table of named parameters same as below including photo=lr-photo:
-- @param photoPath (string, optional) photo-path if available, otherwise will be pulled from raw-metadata.
-- @param previewFile (string, default=unique-temp-path) target path to store jpeg - if non-vil value passed and file is pre-existing, it will be overwritten.
-- @param level (number, required) appx sizes + intended use:
-- <br> 1 - 80x60 small thumb
-- <br> 2 - 160x120 medium thumb
-- <br> 3 - 320x240 large thumb
-- <br> 4 - 640x480 small image
-- <br> 5 - 1280x960 medium image
-- <br> 6 - 2560x1920 large image
-- <br> 7 - 1:1 full-res
-- @param minLevel (number, default=1) minimum acceptable level.
-- @usage file, errm, level = cat:getPreview{ photo=catalog:getTargetPhoto(), level=5 }
-- @usage file, errm, level = cat:getPreview( catalog:getTargetPhoto(), nil, nil, 5 )
-- @return file (string, or nil) path to file containing requested preview (may be the same as preview-file passed in).
-- @return errm (string, or nil) error message if unable to obtain requested preview (includes path(s)).
-- @return level (number, or nil) actual level read, which may be different than requested level if min-level passed in.
function Catalog:getPreview( photo, photoPath, previewFile, level, minLevel )
if photo == nil then
app:callingError( "no photo" )
end
if not photo.catalog then -- not lr-photo
photoPath = photo.photoPath
previewFile = photo.previewFile
-- assert( photo.level, "no level in param table" )
level = photo.level
minLevel = photo.minLevel
photo = photo.photo
-- assert( photo and photo.catalog, "no lr-photo in param table" )
end
if level == nil then
app:callingError( "no level" )
end
if level > 7 then
app:logWarning( "Max level is 7" )
level = 7
end
if photoPath == nil then
photoPath = photo:getRawMetadata( 'path' )
end
local photoFilename = LrPathUtils.leafName( photoPath )
local _previewFile
if previewFile == nil then
_previewFile = LrPathUtils.child( LrPathUtils.getStandardFilePath( 'temp' ), str:fmt( "^1.lrPreview.jpg", photoFilename ) ) -- include extension, since there are separate previews for each file-type.
else
if fso:existsAsFile( previewFile ) then
app:logVerbose( "preview path passed is to existing file to be overwritten" )
end
_previewFile = previewFile
end
local imageId
local s = tostring( photo ) -- THIS IS WHAT ALLOWS IT TO WORK DESPITE LOCKED DATABASE (id is output by to-string method).
local p1, p2 = s:find( 'id "' )
if p1 then
s = s:sub( p2 + 1 )
p1, p2 = s:find( '" )' )
if p1 then
imageId = s:sub( 1, p1-1 )
end
end
if imageId == nil then
return nil, "bad id"
end
local cp = catalog:getPath()
local fn = LrPathUtils.leafName( cp )
local n = LrPathUtils.removeExtension( fn )
local cd = LrPathUtils.parent( cp )
local pn = n .. " Previews.lrdata"
local d = LrPathUtils.child( cd, pn )
local pdb = LrPathUtils.child( d, 'previews.db' )
assert( fso:existsAsFile( pdb ), "nope" )
--Debug.pause( pdb )
local exe = app:getPref( 'sqlite3' )
if not str:is( exe ) then
if WIN_ENV then
exe = LrPathUtils.child( _PLUGIN.path, "sqlite3.exe" )
else
exe = LrPathUtils.child( _PLUGIN.path, "sqlite3" )
end
app:logVerbose( "Using sqlite executable included with plugin: ^1", exe )
else
app:logVerbose( "Using custom sqlite executable: ^1", exe )
end
local param = '"' .. pdb .. '"'
local targ = str:fmt( "select uuid, digest from ImageCacheEntry where imageId=^1", imageId )
local r1, r2, r3 = app:executeCommand( exe, param, { targ }, nil, 'del' )
local uuid -- of preview
local digest -- of preview
if r1 then
if r3 then
local c = str:split( r3, '|' )
if #c >= 2 then
-- good
uuid = c[1]
digest = c[2]
else
return nil, "bad split"
end
else
return nil, "no content"
end
else
return nil, r2
end
local previewSubdir = str:getFirstChar( uuid )
local pDir = LrPathUtils.child( d, previewSubdir )
if fso:existsAsDir( pDir ) then
-- good
else
return nil, "preview letter dir does not exist: " .. pDir
end
previewSubdir = uuid:sub( 1, 4 )
pDir = LrPathUtils.child( pDir, previewSubdir )
if fso:existsAsDir( pDir ) then
-- good
else
return nil, "preview 4-some dir does not exist: " .. pDir
end
local previewFilename = uuid .. '-' .. digest .. ".lrprev"
local previewPath = LrPathUtils.child( pDir, previewFilename )
if fso:existsAsFile( previewPath ) then
app:logVerbose( "Found preview file at ^1", previewPath )
else
return nil, str:fmt( "No preview file corresponding to ^1 at ^2", photo:getRawMetadata( 'photoPath' ), previewPath )
end
-- this could be modified to return image data instead of file if need be.
local content
local function getImageFile()
local p1, p2 = content:find( "level_" .. str:to( level ) )
if p1 then
local start = p2 + 2 -- jump over level_n\0
local p3 = content:find( "AgHg", start )
local stop
if p3 then
stop = start + p3 - 1
else
stop = content:len() - 1
end
local data = content:sub( start, stop )
if previewFile ~= nil then -- user passed file
app:logVerbose( "Writing preview into user file: ^1", _previewFile )
else
-- rename file to include level.
local base = LrPathUtils.removeExtension( _previewFile ) .. '_' .. level
_previewFile = base .. ".jpg"
app:logVerbose( "Writing preview into default-named file: ^1", _previewFile )
end
local s, m = fso:writeFile( _previewFile, data )
if s then
app:logVerbose( "Wrote preview file: ^1", _previewFile )
return _previewFile
else
return nil, m
end
else
return nil -- no real error, just no preview at that level.
end
end
minLevel = minLevel or 1
local status
status, content = LrTasks.pcall( LrFileUtils.readFile, previewPath )
if status and content then
repeat
local file, errm = getImageFile() -- at level
if file then
return file, nil, level
elseif errm then
return nil, errm
elseif level > minLevel then
level = level - 1
else
return nil, str:fmt( "No preview for ^1 at any acceptable level", photoPath )
end
until level <= 0
return nil, str:fmt( "Unable to obtain preview for ^1", photoPath )
else
return nil, str:fmt( "Unable to read preview source file at ^1, error message: ^2", previewPath, content )
end
end
This function is working great so far, but as of 2011-09-29 it has not been rigorously tested, so it may have a bug or two...
It is based on the elare plugin framework available here (including source code): https://www.assembla.com/spaces/lrdevplugin/
You will need sqlite3 executable from here: http://www.sqlite.org/sqlite.html
- put it in lr(dev)plugin dir
Note: view-factory's picture component will accept a path as resource id, so to use:
local pictureFile, errm = cat:getPreview( photo, nil, nil, 4 )
if pictureFile then
items[#items + 1] = vf:picture {
value = pictureFile,
end
Note: the above code is intended for "sample/example" only -
MUST DO:
- Handle portrait orientation properly...
MAYBE DO:
- Handle AdobeRGB profile assignment - not needed for thumbs, but maybe for the biggies...
- Optimize for multi-photo use.
- Change detection for sake of caching for repeated access (like scrolling thumbnails).
@2011-10-04, the code at Assembla.com (see link above) takes care of all these things, and then some...;-)
Rob
Thank for so interesting and undocumented feature. Where you get it?
[quote]In Mac version there's a file called Contents/PlugIns/MultipleMonitor.lrmodule/Contents/Resources/LrPhotoPictureView.lua[/quot e]
On my version of Lr3 this lua script is compiled. Did you puzzle out decompiled code?
Unfortunatelly, there are some issues with this way of getting preview:
1) sqlite doesnt work with localized paths like i,e c:\users\Администратор... I tried to solve it with using utf8 or uri formats for path but useless. I solved it with usind short form of path (in windows. On mac I didnt yet tested it). To get a short form of path I use a simple script launched in cmd shell, some like "echo %~s1" and it take a shorf form of path i.e.
C:\Users\836D~1\...
instead of
C:\Users\Администратор\
2) The main problem is what if I work in "Develop" mode and if I change an image setting then previews will not be refreshed until I dont switch into "Library".
Maybe somebody know a way how to push Lightroom to refresh previews db into "Develop" mode?
Of course, all it is actually for Lr3 and Lr4 only. In Lr5 there is another API for get smart preview. But I would like to support and Lr3-4 audience also
Similar Messages
-
How to read some images from file system with webdynpro for abap?
Hi,experts,
I want to finish webdynpro for abap program to read some photos from file system. I may make MIMES in the webdynpro component and create photos in the MIMES, but my boss doesn't agree with me using this way. He wish me read these photos from file system.
How to read some images from file system with webdynpro for abap?
Thanks a lot!Hello Tao,
The parameter
icm/HTTP/file_access_<xx>
may help you to access the pictures without any db-access.
The following two links may help you to understand the other possibilities as well.
The threads are covering BSP, but it should be useful for WebDynpro as well.
/people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents
http://help.sap.com/saphelp_sm40/helpdata/de/c4/87153a1a5b4c2de10000000a114084/content.htm
Best regards
Christian -
Can I use LabVIEW to load data directly into system memory from a VI? The serial card I'm using isn't supported by NI nor does VISA recognize it. I'm using a Call Library function to read the data from the card and now I want it to go directly to system memory.
The data is being received at 1Mbps.
ThanksTwo questions:
One, if it's a serial card, then presumably it gives you more serial ports, like COM3, COM4, etc. If so, VISA would see the COM ports, and not the card directly. The drivers for the card should make it so that you see the extra serial ports from the OS. If you don't see the extra COM ports from VISA, then it sounds like the drivers for the card are not installed properly. Do the extra COM ports show up in Device Manager?
Two, you said that you're using a Call Library function to get the data and you want to put it into system memory. Errr.... you just read the data and you have it in memory by definition. Are you saying you need a way to parse the data so it shows up on a graph or something? -
Can BI Publisher read the images from the Database?
Hi All,
Can BI Publisher read the images from the Database?
if yes how it can be achieved?
Thanks
AravindHi,
There is an example in oracle db. Use the schema PM (Print Media).
Select the corresponding table that contains the column AD_PHOTO.
In your RTF template simply to print the image stored in the db use:
<fo:instream-foreign-object content-type="image/jpg"> <xsl:value-of select="AD_PHOTO"/>
</fo:instream-foreign-object>
RUn the RTF template and it should show you all.
Cheers
Jorge
p.s. If this answers your question then please grant the points and close the thread -
How to read an image from an file using jsp
reading an image from an file present on local disk using jsp
Server-local or client-local? First, File I/O, second: better get a new job.
-
How to read bytes(image) from a server ?how to display image after read byt
How to read bytes(image) from a server ?how to display image after reading bytes?
i have tried coding tis , but i couldnt get the image to be display:
BufferedInputStream in1=new BufferedInputStream(kkSocket.getInputStream());
int length1;
byte [] data=new byte[1048576];
if((length1=in1.read(data))!=-1){
System.out.println("???");
}System.out.println("length "+length1);
Integer inter=new Integer(length1);
byte d=inter.byteValue();didn't I tell you about using javax.imageio.ImageIO.read(InputStream) in another thread?
-
How can i read a image from clipboard
Hi all,
Can you anyone help me to figure out this problem,actually i have an VI that capture screen image(similiar to print screen option in windows) & save it in a file.and now the thing is,its working in code,once if i converted that to EXE it is not reading that image from the clipboard .I have attached that VI along with this thread please check it.
Attachments:
Clipboard.vi 20 KBHey,
It seems that the Get Image from Clipboard method is not available for executables.
The following thread gives a working example with a CIN -> http://forums.ni.com/ni/board/message?board.id=170&message.id=35987&requireLogin=False
Christian -
How can i read a image from a oracle DB?
How can i read a image from a oracle DB?
Because in the DB a have a field that is a picture that i would like to show in a jpanel.....but this field is in oracle DB only has strange caracters ..... so Do i have to read this field like a input stream?....
Could some body help me please?
Thanks...
MaryWell I suppose the picture is stored in a blob. If that is so this is some code I have used to load a picture to a panel. Hope you find it usefull.
PreparedStatement retreive = db.createPreparedStatement("select bl from test where ln = ?");
Blob bl;
try{
retreive.setBigDecimal(1, new BigDecimal(jTFln.getText()));
ResultSet rs = retreive.executeQuery();
if (!rs.next())
System.out.println("Empty Result Set");
bl = rs.getBlob("bl");
if (bl == null) {
System.out.println("Null Blob");
return;
InputStream is = bl.getBinaryStream();
int imageLength = (int) bl.length();
System.out.println(imageLength);
System.out.println(bl.length());
byte[] imageData = new byte [imageLength];
is.read(imageData, 0, imageLength);
image1 = new ImageIcon(imageData);
photo = new JPanel() {
public void paint(Graphics g){
g.setColor(Color.lightGray);
g.drawImage(image1.getImage(), 0, 0, this);
} catch (BadLocationException ble){
ble.printStackTrace();
} catch (SQLException sqle){
sqle.printStackTrace();
} catch (IOException ioe){
ioe.printStackTrace();
} -
Extracting JPEG preview image from DNG file
My company is using the DNG SDK to support raw or DNG files for users of our digital asset management software. We extract a jpeg preview/thumbnail from ALL file types we support.
My question is: how can we extract a jpeg preview from a DNG file, using the latest version of the DNG SDK?
Currently, our software uses the SDK to read a DNG file and write a tiff file, and passes the tiff to imagemagick to get a resized jpeg we can use for a preview or thumbnail.
When we extract the tiff from the customer's file, we get a base version of the image that does not show subsequent colour adjustments made in (eg) CS3; the customer would like to get a preview that shows (especially) the colour adjustments that have been made.
I know the jpeg preview exists inside the DNG, I used exiftools to extract it,and it does show the colour adjustments made.
How do I get that preview image out of the DNG file using the DNG SDK? Does the DNG SDK support that operation?
The SDK has a lot of API, but not much documentation or samples to show usage.
Thanks for any help anyone can provide.Maybe it isn't the smartest way, but this should work:<br /><br />... call info.Parse (host, stream) etc here - the usual stuff<br />{<br /> // find biggest jpeg image for preview<br /> unsigned int subMaxW=0;<br /> int subMaxI=-1;<br /> for(unsigned int i=0;i<info.fIFDCount;i++)<br /> {<br /> dng_ifd* pIFD=info.fIFD[i].Get();<br /> if (ccJPEG==pIFD->fCompression && 1==pIFD->fNewSubFileType)<br /> {<br /> if (pIFD->fImageWidth>subMaxW)<br /> {<br /> subMaxW=pIFD->fImageWidth;<br /> subMaxI=i;<br /> }<br /> }<br /> }<br /> if (subMaxI>=0) // load desired jpeg preview<br /> {<br /> unsigned int i=subMaxI;<br /><br /> dng_ifd* pIFD=info.fIFD[i].Get();<br /> if (ccJPEG==pIFD->fCompression && 1==pIFD->fNewSubFileType)<br /> {<br /> // seek to pIFD->fTileOffset[0] and load jpeg<br /> } <br /> }<br />}
-
Read Tif Image from Database Display in Windows Fax Viewer
Code for reading a BLOB from Oracle which is a TIF image and displaying it in Windows Picture and Fax Viewer. Gives the ability to display with perfect resolution, Zoom In & Out, Rotate and Print.
I m storing the image on my C drive, you can store where ever you want.
package com.test.examples;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import oracle.sql.BLOB;
public class Test {
* Main method for calling the View Tif Image method.
* @param args
public static void main(String[] args) {
String id = "123";
Test test = new Test();
test.viewTifImage(id);
* Method for viewing TIF Image
public void viewTifImage(final String id) {
BLOB blob = null;
FileOutputStream outStream = null;
InputStream inStream = null;
final String filename = "C:\\Images\\image.tif";
if (Helper.stringNotNullAndEmpty(id)) {
try {
imageDAO = new ImageDAO();
blob = imageDAO.getImageBLOB(id);
File blobFile = new File(filename);
outStream = new FileOutputStream(blobFile);
inStream = blob.getBinaryStream();
int length = -1;
int size = new Long(blob.length()).intValue();
byte[] buffer = new byte[size];
while ((length = inStream.read(buffer)) != -1) {
outStream.write(buffer, 0, length);
outStream.flush();
showTiff(filename);
inStream.close();
outStream.close();
} catch (IOException ioe) {
System.out.println("Exception in IO block.");
ioe.printStackTrace();
try {
inStream.close();
outStream.close();
} catch (IOException ioe1) {
ioe1.printStackTrace();
}catch (DAOException daoe) {
System.out.println("Exception while getting the BLOB");
daoe.printStackTrace();
} catch (Exception ex) {
System.out.println("ERROR(djv_exportBlob) Unable to export:"
+ filename);
ex.printStackTrace();
} finally {
try {
inStream.close();
outStream.close();
} catch (IOException e) {
System.out.println("Exception in IO block.");
e.printStackTrace();
public static boolean showTiff(String fileName) throws IOException {
String progDir = System.getenv().get("SystemRoot");
System.out.println("SYSTEM ROOT DIRECTORY" + progDir);
// turn the backslash around to a forward slash
int x = progDir.indexOf('\\');
String front = progDir.substring(0, x);
String back = progDir.substring(x + 1);
progDir = front + "/" + back;
String osCmd = progDir + "/system32/rundll32.exe " + progDir
+ "/system32/shimgvw.dll,ImageView_Fullscreen " + fileName;
try {
System.out.println("command is " + osCmd);
Runtime rt = Runtime.getRuntime();
Process ps = rt.exec(osCmd);
} catch (IOException ie) {
System.out.println("error running fax viewer");
return false;
return true;
Let me know if you find some thing wrong in here.
Thanks
raffuREad all the file paths from DB in e.g. List<String>. Define javax.swing.Timer.
How to use timer read here
http://leepoint.net/notes-java/other/10time/20timer.html
or
http://docs.oracle.com/javase/tutorial/uiswing/misc/timer.html
When the timer's actionPerformed happens use next index in the array to get next filePath and show your image. When end of list is achieved just stop the timer (or startd from the beginning of the list again). -
Reading an image from input stream
Hello all,
I'm familiar with setting up an input stream but I have never actually done it. I'm making a connection to a URL (a JPG image). I would like to read the JPG from the URL using an input stream. With the URL class I was able to open a stream, however, I'm not exactly sure how to read from it.
I'm aware of the read() method and read(byte[]) methods of inputstream. But how do I actually implement it?
If I use read(), then bytes come in individually... do I need to combine them at one point? If I read the bytes into an array, how do I determine what size to set the array and how do I convert the byte array into an Image or ImageIcon?
Please advise.
R. AlcazarHi,
See http://java.sun.com/products/jdk/1.2/docs/guide/2d/api-jpeg/
and especially JPEGCodec.createJPEGDecoder(java.io.InputStream).
Anyway, you might not want to do it with InputStream. Instead you could try something like this:
URLConnection con = // get it somehow
Image i = (Image) con.getContent(new Class[] {Image.class});
However, If you still want to use the InputStream, here you go with some pseudo code:
InputStream in = // get the input stream with JPEG data...
JPEGImageDecoder dec = JPEGCodec.createJPEGDecoder(in);
Image i = dec.decodeAsBufferedImage();
You can get the InputStream from the URLConnection with getInputStream(). However, I don't remember if the InputStream contained also the HTTP (or what ever protocol the URL specifies) headers. If it contains the headers, then you must rip them of before giving the InputStream to the JPEGCodec...
If this is the case, try calling the URLConnection.getHeaderFields() method before getInputStream. This might not work though. -
No preview images from raw files during import any suggestions?
Lightroom will not display preview images during import of raw images. Any images in other formats display fine but with raw images I get a gray window the size of the preview image and the words "preview unavailable for this file". Adobe tech support has been no help they don't what is going on. Running Windows XP 64, Lightroom 3.3. Any suggestions?
I have the same problem when pluging the camera directly to PC. But if I use the card reader, everything is normal. Win7 64bit.
-
I have a video player that plays multiple videos. I added an
item called "preview" to the XML which looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<playlist id="Adobe Developer Center - Dynamic Video
Playlist in AS3" >
<vid desc="Mitzvahpalooza featuring Chicago Jewish Teens
Got Talent"
src="
http://www.juf.org/interactive/videos/mitzvahpalooza_08.flv"
thumb="
http://www.juf.org/interactive/thumbs/mitzvahpalooza_btn.jpg"
preview="
http://www.juf.org/interactive/thumbs/mitzvahpalooza_btn.jpg"/>
<vid desc="Chicago Jewish Community Memorial Evening of
Tribute and Solidarity"
src="
http://www.juf.org/interactive/videos/mumbaimemorial.flv"
thumb="
http://www.juf.org/interactive/thumbs/MumbaiFull_btn.jpg"
preview="
http://www.juf.org/interactive/thumbs/MumbaiFull_btn.jpg"/>
</playlist>
I am trying to have a preview image of which ever video is
ready to play lay over the video layer. The AS3 is in an external
AS document. I cannot figure out how to integrate it into the
following code. Can anyone give me a hint or the answer? Thank you.
package {
import flash.display.*;
import flash.net.navigateToURL;
import flash.events.MouseEvent;
import fl.video.VideoEvent;
import flash.display.MovieClip;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
import fl.controls.listClasses.CellRenderer;
import fl.controls.ScrollBarDirection;
import flash.display.SimpleButton
public class VideoPlaylist extends MovieClip {
private var xmlLoader:URLLoader;
public function VideoPlaylist():void {
// Load the playlist file, then initialize the media player.
xmlLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, initMediaPlayer);
var videoplaylist = '
http://www.juf.org/interactive/xml/playlist.xml';
xmlLoader.load(new URLRequest(videoplaylist));
// Format the tileList, specify its cellRenderer class.
tileList.setSize(312, 130);
tileList.columnWidth = 104;
tileList.rowHeight = 80;
tileList.direction = ScrollBarDirection.HORIZONTAL;
tileList.setStyle("cellRenderer", Thumb);
public function initMediaPlayer(event:Event):void {
var myXML:XML = new XML(xmlLoader.data);
var item:XML;
for each(item in myXML.vid) { // populate playlist.
// Get thumbnail value and assign to cellrenderer.
var thumb:String;
if(item.hasOwnProperty("@thumb")>0) thumb = item.@thumb;
// Send data to tileList.
tileList.addItem({label:item.attribute("desc").toXMLString(),
data:item.attribute("src").toXMLString(),
source:thumb});;
// Select the first video.
tileList.selectedIndex = 0;
// Listen for item selection.
tileList.addEventListener(Event.CHANGE, listListener);
// And automatically load it into myVid.
myVid.source = tileList.selectedItem.data;
//Goes to a frame in the current video
myVid.bufferTime = 3;
myVid.seek(2)
// Pause video until selected or played.
myVid.pause();
// Detect when new video is selected, and play it
function listListener(event:Event):void {
myVid.play(event.target.selectedItem.data);Hi,
this is due to some restrictions with the XML forms application and can not be configured.
So you need to develop if you need a different behaviour, but it may be that XML forms behave not correctly then.
Regards,
Sascha -
How to read/write image from Microsoft Word
Hello All,
I have to replace an image from word(.doc) files.How to read/write images, can any body help me out.
Thanks in Advance
Harish Sohaneharissohane wrote:
Hi,
Thanks a lot. if any body knows about it please let me know. waiting for reply.
Thanks in AdvanceLooking at POI again, it doesn't let you write them, but it does let you read them.
[A list of API's found in Google in 10 seconds.|http://schmidt.devlib.org/java/libraries-word.html] -
How to read jpg image from a specified path
Hi
I am having an image in jpg ext, so i am using File nf = new File(path);to read the image, now i have to place that jpg image in an byte/String array so from that i will save that in to the Oracle DB with BLOB data type, plz answer to this asap with code......
the following code is not useful i think so...
String st = "C:\Documents and Settings\Sasi\Desktop\sasi.jpg"
File infile = new File(st);
BufferedImage im = ImageIO.read(infile);
String[] reader_names = ImageIO.getReaderFormatNames();plz reply to this asap,
regards
sasiSasi9 wrote:
String st = "C:\Documents and Settings\Sasi\Desktop\sasi.jpg"
File infile = new File(st);
//BufferedImage im = ImageIO.read(infile);
//String[] reader_names = ImageIO.getReaderFormatNames();
byte[] buffer = new byte[infile.length()];Now use a RandomAccessFile to read the file into your byte array. [readFully(buffer);|http://java.sun.com/j2se/1.4.2/docs/api/java/io/RandomAccessFile.html]
Maybe you are looking for
-
Possible to run an Express in N, and join another N Express broadcasting G?
I hope my title to this explained what I am trying to find out. I have two Airport Express N's that I want to connect to my existing router (Cradlepoint CTR500). One Express will be connected over Ethernet to the router, which is creating the WiFi ne
-
EBS Applications User unable to run Report in BI Publisher 11g
We have recently upgraded the BI Publisher (xmlpublisher) from 10g to 11g. We could login using the fnd_user and could see all our reports in the newly upgraded BI Publisher. But when a user runs a report with previously assigned roles, the report th
-
Targeted Disk mode only shows one of two hard disks...
Got a new computer to transfer old info to from my dual g4 1 gig mirrored. When i set in targeted disk mode only one hard drive shows up. I confirmed both are set to cable select and only the master is showing. If I swap the drives the master is the
-
How do i find the internet MAC address for my MBP?
I am trying to get my MBP integrated into my home wireless network. Need to enter MAC address.
-
Consignment settlement using currency USDN
Dear All, I have a question in regards to consignment settlement using currency type USDN. **My client would want to use 5 decimal places and hence using USDN currency type** At present for consignment process, we are maintaining a Cons info record w