Multiple images from static URL
I am currently writing an applet that grabs radar images from a static URL. The image on the URL is updated every 15 minutes. I have a timer that will grab the image every 15 minutes and put it in an image[] array. Eventually I will be looping these images, and let the user define how far back to loop and how fast the loop is. Right now, though, every image it grabs is the same as the very first one. For testing purposes I have the URL currently set to an online panda cam with a timestamp (so I dont have to wait 30 minutes every build to see if it works on the radar URL). If I start the program at 12:47:51(timestamp on webcam) , it grabs a new image every 10 seconds. After a few minutes I have an array of images with the timestamp 12:47:51, every image is identical.
well, I have the url
"url"
and the image[] array
"imageArray[x]"
in the actionPerformed for the timer:
imageArray[x] = getImage(url); Currently I just have a button to step thru the images.
backg.drawImage(imageArray[counter],0,0,radarWidth,radarHeight,Color.white,this);Just to see if that worked I loaded the array with images from different URLs, and I was able to display them all without problem. Just when I use the static URL do I get the problem of the repeated image.
Similar Messages
-
Can you edit multiple images from a PDF in photoshop?
I scan a lot of old publications with images and drawings. The images are in greyscale, but my scanner produces better results set to color. As such, I have to convert the images to greyscale in Photoshop from Acrobat. I have several PS actions that make this process easier, but I wish there was a way to select multiple images from a page or PDF file and run the actions on them (a batch) instead of one at a time. Is there? Or perhaps another method than what I am doing?
I recommend that you scan first, save as TIFF, do any desired correction, and only then make PDFs. Scanning direct to PDFs is great for simple uncomplicated workflows, but a liability when correction is needed.
-
[noob needs help] Loading image from a URL
Hey everyone. I'm new here. And I'm new at J2ME as well.
I have a simple school project and I have doubts about it. I've searched everywhere on the net yet I could not find the solution. Anyways, I do understand the concept of loading images by putting the files in the "res" folder and use:
try
img = Image.createImage("/burgerimgsmall.jpg");
catch (Exception e)
e.printStackTrace();
But my project requires me to load an image from a URL. How do I go about doing that? If it helps, here's the URL:
http://img.photobucket.com/albums/v703/punkgila/burgerimgsmall.jpg
Thanks guys!Don't worry, downloading image from http is also simple. Look into Photoalbum demo in wtk2.5
-
I want to download an image from the url and image is in byte format
hi
i want to download an image from the url
http://www.tidelinesonline.com/mobile/j2me_v1?reqType=imageJoin&imageCount=1&month=1&day=1&year=2008&id=1&imageWidth=230&imageHeight=216&imageDepth=8&imageUnits=feet&imageType=JPG&msisdn=456
first 5 digits will be the length of the image,we need to download except first 5 digits and display an image file
i need to finish this today
pla reply if any body knows solution for this.
thanks in advance
MrajYou do not need to do anything - iPhoto always keeps the original and you can revert to it at any time
If you want to be able to see the original and the cropped version in iPhoto at the same time duplicate the photo (this does not really duplicate but simply starts a new edit stream for the photo - command-d) and crop the duplicate
LN -
Inserting an image from an URL in a BLOB
Hello all,
As it's said in the title, I need a PL/SQL procedure to insert a image from web URL in a BLOB table column.
How can I do that?
Thanks in advance for your help.
Maxfound this on the internet http://www.oracle-base.com/articles/misc/RetrievingHTMLandBinariesIntoTablesOverHTTP.php
CREATE TABLE http_blob_test (
id NUMBER(10),
url VARCHAR2(255),
data BLOB,
CONSTRAINT http_blob_test_pk PRIMARY KEY (id)
CREATE SEQUENCE http_blob_test_seq;
CREATE OR REPLACE PROCEDURE load_binary_from_url (p_url IN VARCHAR2) AS
l_http_request UTL_HTTP.req;
l_http_response UTL_HTTP.resp;
l_blob BLOB;
l_raw RAW(32767);
BEGIN
-- Initialize the BLOB.
DBMS_LOB.createtemporary(l_blob, FALSE);
-- Make a HTTP request and get the response.
l_http_request := UTL_HTTP.begin_request(p_url);
l_http_response := UTL_HTTP.get_response(l_http_request);
-- Copy the response into the BLOB.
BEGIN
LOOP
UTL_HTTP.read_raw(l_http_response, l_raw, 32767);
DBMS_LOB.writeappend (l_blob, UTL_RAW.length(l_raw), l_raw);
END LOOP;
EXCEPTION
WHEN UTL_HTTP.end_of_body THEN
UTL_HTTP.end_response(l_http_response);
END;
-- Insert the data into the table.
INSERT INTO http_blob_test (id, url, data)
VALUES (http_blob_test_seq.NEXTVAL, p_url, l_blob);
-- Relase the resources associated with the temporary LOB.
DBMS_LOB.freetemporary(l_blob);
EXCEPTION
WHEN OTHERS THEN
UTL_HTTP.end_response(l_http_response);
DBMS_LOB.freetemporary(l_blob);
RAISE;
END load_binary_from_url;
EXEC load_binary_from_url('http://forums.oracle.com/forums/themes/english/resources/oralogo_small.gif'); -
Can I somehow let the user select multiple images from device?
Is there any way to let the user select multiple images from the device media gallery?
The CameraRoll only selects one image. And the FileRefernceList doesn't show thumbnails (so you have no idea what you are selecting).
Is there a way, or maybe some sort of workaround, for this? Is there a way to maybe "read" the users gallery on the SD-card and output your own gallery that the user can select from?
I'm developing towards both Android and iOS so cross-plattform is a must.
Thank you guys+1 to this question. I'm looking to do the same thing but haven't had any luck yet.
-
Load multiple images from directory?
What is the best way to use CF to load multiple images from a
server directory please? I have CF calling a stored procedure that
returns an array of file names. I am using a Flex front end, and
wonder if I should just pass the file name array to Flex and let it
loop through and load each image into an array. Or is it possible
from within my CFC to use the file name array to get CF to grab the
images and then pass that image array back to Flex? If so, is there
any advantage to either approach? TIA,
Mic.You don't want to pass the binaries to Flex, you should just
give Flex the image names and load them via HTTP. -
How to retrive multiple images from database
Hi,
I have to retrieve multiple images from oracle database and have to display the image in the jsp.
I am passing imageCategoryId from the jsp.This id contain number of image in DB.
I googled the issue and i found some solution.want to know whether what i did is correct and how i have to display the retrieved image in jsp.
Need urgent help.Experts kindly help me.
This is my action file.
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.naming.NamingException;
import com.image.dao.ImageDAO;
public class GetImageServlet extends HttpServlet{
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException{
try{
ImageDAO image = new ImageDAO();
String categoryId = request.getParameter("catgId");
bytes[] imagebyte = image.getImagesByCategoryId(categoryId);
InputStream is = new FileInputStream(imagebyte);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
bos.write(imagebyte);
blobIs.close();
catch(IOException e){
e.printStackTrace();
} catch(Exception excep) {
excep.printStackTrace();
This is DAO file
public byte[] getImagesByCategoryId(String categoryId) throws Exception
PreparedStatement statement = null;
ResultSet resultSet = null;
StringBuffer queryBuffer = new StringBuffer();
Blob image = null;
String imageId = null;
ArrayList imageIdLIst = new ArrayList();
try {
this.connection = connManager.getDataSourceConnection();
queryBuffer.append("select image from Image_Table where image_category='"+categoryId+"'");
statement = connection.prepareStatement(queryBuffer.toString());
resultSet = statement.executeQuery();
while(resultSet.next()) {
image = rs.getBlob(1);
long imgLength = image.getBufferSize();
byte[] byteImage = new byte[imgLength];
byteImage = image.getBytes(1,(int)imgLength);
} catch(Exception excep) {
excep.printStackTrace();
return byteImage;
How to display retrieved image in jsp.
whether action and dao file is correct or what changes i have to do to correct the problem.
P.S : As a Newbie i dont know how to use code tag for this java code.Kindly forgive me.
Regards,
hardlyUsed.hardlyused wrote:
I have to retrieve multiple images from oracle database and have to display the image in the jsp.There are at least two parts to the problem.
1. Get it from the database.
2. Display it.
Part 1 has nothing to do with part 2.
You must solve 1 before you solve 2.
Finally generically there is no such thing an "image" but rather there is binary data which is represented in such a way that it one of many formats that represent an "image".
Knowing which specific format the "image" is stored in will at a minimum be helpful and could be required. -
I need to write a simple(even dos based) app that saves an image from a url (ie http://www.google.com/images/logo.gif) into c:\temp\*filename*
thanks alot for the helpIts just like reading/writing a regular file. Check out the 'Custom Networking" tutorial found on this page:
http://java.sun.com/docs/books/tutorial/ -
Hi,
I've looked through the Java Swing tutorial and I've searched the forums here, but I haven't figured out how to load an image from a URL into my GUI and display it.
I don't want the image to be at certain coordinates, as I am using the FlowLayout. My problem is: how do I load an image from a URL, then display it in a JPanel, such as a JScrollPane?
I'm sorry if I missed any tutorials or similar things about this topic, but if anyone could provide some advice, I would appreciate it.
Thanks,
Dantry this:
try {
JLabel label = new JLabel(new ImageIcon(new URL("http://developers.sun.com/forums/img/gold.gif")));
JScrollPane sp = new JScrollPane(label);
catch (MalformedURLException x) {
x.printStackTrace();
} -
I need to download image from the url and the image is in byte format.
hi
i need to download image from the url
http://www.tidelinesonline.com/mobile/j2me_v1?reqType=imageJoin&imageCount=1&month=1&day=1&year=2008&id=1&imageWidth=230&imageHeight=216&imageDepth=8&imageUnits=feet&imageType=JPG&msisdn=456
first 5 digits will be its length,we need to download except 5 digits.
can any one know how to do that.
thanks in advance
Mrajhi
i need to download image from the url
http://www.tidelinesonline.com/mobile/j2me_v1?reqType=imageJoin&imageCount=1&month=1&day=1&year=2008&id=1&imageWidth=230&imageHeight=216&imageDepth=8&imageUnits=feet&imageType=JPG&msisdn=456
first 5 digits will be its length,we need to download except 5 digits.
can any one know how to do that.
thanks in advance
Mraj -
I want to download and image from the url and image is in byte format
hi
i want to download the image from the url:
http://www.tidelinesonline.com/mobile/j2me_v1?reqType=imageJoin&imageCount=1&month=1&day=1&year=2008&id=1&imageWidth=230&imageHeight=216&imageDepth=8&imageUnits=feet&imageType=JPG&msisdn=456
can any one help me to do this i need to finish this today plz help me.
first 5 character 09593 is the length of the image we need to substract image length from total length.
thanks in advance
M.Raj
Edited by: Mraj.Bangalore on May 15, 2008 12:01 AM
Edited by: Mraj.Bangalore on May 15, 2008 12:01 AMhi
thanks for the reply,
that works only if .png file is there in the path.
i worked it out, it is working fine now
try
httpConn = (HttpConnection)Connector.open(url);
is=httpConn.openInputStream();
responseCode = httpConn.getResponseCode();
if(httpConn.getResponseCode() == 200)
ByteArrayOutputStream bStrm = null;
byte[] data = new byte[512];
int contentLen = httpConn.getHeaderFieldInt("Content-Length", 0);
if(contentLen > 0)
response = new byte[contentLen];
else
bStrm = new ByteArrayOutputStream();
int count = 0, tmp =0;
while ((count = is.read(data)) >= 0)
if( contentLen > 0 )
for(int i=0;i<count && tmp+i < contentLen;i++)
response[tmp+i] = data;
tmp += count;
else
bStrm.write(data, 0, count);
// if( aborted)
// break;
data = null;
System.gc();
if( contentLen <= 0 )
response = bStrm.toByteArray();
bStrm.close();
bStrm = null;
System.gc();
else
// main.showAlert("ERROR","Connection failed.Please access again later");
// main.changeToMain();
catch(Exception e){
response = null;
responseCode = 0;
// main.showAlert("ERROR","Connection failed.Please access again later");
// main.changeToMain();
catch(OutOfMemoryError e){
// main.showAlert("ERROR","Not enough memory, please disable some apps or delete files and try again.");
// main.changeToMain();
finally
System.out.println("Before Creation"+response.length);
img = Image.createImage(response, 5, response.length-5);
System.out.println("After Creation");
CanvasImageFile canvas = new CanvasImageFile(this);
midlet.display.setCurrent(canvas);
try
if( is != null )
is.close();
is=null;
catch(Exception ex){
// main.showAlert("ERROR","Connection failed.Please access again later");}
if( httpConn != null )
try {
httpConn.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
httpConn=null; -
How do I import multiple images (from Aperture) to multiple pages in Pages?
I can select and drag multiple images from Aperture to Pages, but they all are inserted on the same page. If I have 100 images, can I force Pages to insert one image on each of 100 pages?
Thanks,
RickBurn for what purpose? To share with others?
Export the photos to a folder on the Desktop. Burn that with the Finder. Result: a folder of images that any computer can read.
Using iPhoto's Burn command creates an iPhoto Library on the disk and is suitable only for others also using the same version of iPhoto.
This User Tip
https://discussions.apple.com/docs/DOC-4921
has details of the options in the Export dialogue.
Note that rewriteable disks do not necessarily mean that you can append files to them, and require special burning software to do so.
Regards
TD -
Are there any updated functions or apps that would allow you to save multiple images from a text message to camera roll from iphone? If not, what are the best alternatives these days?
Some apps, like Mail allow you to do this but others do not. Tap on photo and a list of choices comes up. In Mail one of the choices is to Save X Photos where X equals the number of photos in the email. I've never received more than one photo in a text so I'm not sure if this same choice will appear there.
-
How can I use wget, cron and Automator to periodically pull an image from a URL (which is dynamically updated - like a weather map, say - to local storage, and then update a Keynote slide with that image, automatically?
Any particular reason for those specific technologies? wget does not exist on a mac, although you can nstall it I guess. OS X has curl installed which should do pretty much anything you want to do with wget. cron is being replaced by launchd, although cron still exists on mountain lion.
As far as I can tell from automator all the standard 'actions' to access keynote available to it require keynote to be open and running, but does not provide a function to actually open it. So I think you will have to write some applescript, as a minimum to open and quit keynote. I notice that the keynote actions are mostly circa 2005 an wonder if they would even work.
Under utilities in automator 'actions' there is a capability to add applescripts as part of the workflow.
Also, note that cron is being dprecated by Apple and replaced by launchd. that said cron is stil on my mountain lion instalation.
This entry at stackoverflow shows use of cron with curl to get web urls. http://stackoverflow.com/questions/1683620/getting-started-with-cronjobs-on-a-ma c
If I have any time I may try and get this to work as it is quite interesting and new to me. But otherwise, good luck.
Maybe you are looking for
-
Display has gone - can anyone assist me to do a final time machine backup?
Hi all, My macbook pro for the last couple of months has done something odd sporadically - the display kind of crashed (ie looked like the screen was smashed pixels everywhere) so I assumed my mac was on its last days and ordered a new one, hopefully
-
Is there a an easy way to add a video to a master page? Thanks
-
How do I transfer contacts from my iPhone 3G to Address Book on my Macbook?
I am running Mac OS X 10.6.8 on my Macbook. How can I sync or transfer contacts into my address book from iPhone 3G?
-
Problem with Export Project as New Library
Getting some behavior from Aperture that I do not understand. I am running Aperture 3.5.1 on OSX 10.9.1 on both a MacPro and a MacBookPro(Retina). Both machines are believed to be completely up-to-date software-wise (no indication in App store that
-
Project systems integration with portal (EP)
Dear all, I have to integrate the projects systems module with Portal.(EP) In portal transactional I views can be used to create projects which can be store in the R/3. Now the issue is to create projects with out using Transactional I views. This sh