-3

I am working on a huge project using Delphi XE5, the core of the program is to open an image using the TImage component on the application but the image is on a server that is accessed trough the internet. The image that displays depends on the criteria set trough other events or actions from the user. I already have the criteria's code etc in place, I only neet die Image display part..

What other components do I need to use other than TImage component to make this happen and how does one do this? I have been searching for answers for more than a week and couldn't find something that works.

This is also a multi platform application.

Charles
  • 50,943
  • 13
  • 104
  • 142
Harmdw
  • 1
  • 1
  • is this a Firmenonkey or VCL app? – Ryno Coetzee May 08 '14 at 07:26
  • Please define "accessed through the internet", because you need to transport some data (image) – Sir Rufo May 08 '14 at 07:27
  • Its a Firemonkey app that I must compile for windows, android, IOS and OS X – Harmdw May 08 '14 at 07:28
  • With "accessed though the internet" I mean the people must be able to use the app from their homes, but all the images are stored on a server at the workplace thus my guess is that it should retrieve the image from the server though the internet not local – Harmdw May 08 '14 at 07:31
  • To give more clarity to my question.. How does one then give the path to the TImage component to display the image? – Harmdw May 08 '14 at 07:37
  • It is obvious that "through the internet" is meant to be to get some data from somewhere in general. This can also ment you call someone via skype to sent you the image and you will receive the image by mail - it is all done "through the internet". Please clarify your question – Sir Rufo May 08 '14 at 08:30
  • Did you bother to google this? – Kell May 08 '14 at 15:02
  • Rufo's point is that you need to decide on a mechanism for the app to request the file, and for the server to serve it. You might want to look into writing a webservice, you might be able to provide a fileshare through a VPN, the server might EMail the file... the list of possibilites is endless. It is not possible for us to give a definitive answer until you have decided the appropriate technology. Start with some research into web services though. – Hugh Jones May 08 '14 at 15:02
  • Let me first define the word "internet" and then rephrase the question in even simpler terms... The Internet is a global system of interconnected computer networks that use the standard Internet protocol suite (TCP/IP) to link several billion devices... To put it simpler, its a HUGE network... So, what needs to be done is that an image that's on a company's server(who cares where) should be displayed in a Timage object depending on the users input. Even simpler, I need to access an image through the network(which is the internet) and display it on a form... – Harmdw May 08 '14 at 15:41
  • Oh, and about the "have I googled it", I've been on the internet for a week and could not find hat I was looking for, that's why I asked the question here. And I mean no disrespect by this. – Harmdw May 08 '14 at 15:44

2 Answers2

0

Found what I was looking for at FireMonkey iOS RAD Studio XE2 - Display Image on form loaded from URL although its a bit slow, but for now it can do the job just fine.

Community
  • 1
  • 1
Harmdw
  • 1
  • 1
  • Ok, you decide to retrieve the image via **http** and not **ftp**, **pop3**, **imap**, etc. (btw. all of them are well known transport protocols based on **tcp** and all work through **internet**). That was the missing part, because we don't know your server and what kind of protocols it can serve and you are allowed to install. – Sir Rufo May 08 '14 at 20:58
  • Ahh, now I understand what you meant. But thanks for the interest and help. – Harmdw May 09 '14 at 14:28
-1

Well you can load a TBitmapImage or TJPEGImage from a stream and then stick it into your TImage. However, you will need to know the image type before you do this. Here is an example using TJPEGImage: JPEG data-stream to TImage

Community
  • 1
  • 1
Kell
  • 3,252
  • 20
  • 19
  • Because I'm writing a firemonkey application it doesn't seem to recognise the `JPEG` unit in the `uses` clause when I add it. – Harmdw May 08 '14 at 13:23
  • Why the downvote? In firemonkey, TBitmap.LoadFromStream loads all supported formats. http://docwiki.embarcadero.com/Libraries/XE2/en/FMX.Types.TBitmap.LoadFromStream – Kell May 08 '14 at 15:01