473,566 Members | 2,908 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Speed issue loading image

Hi

I am using below statement to load an image;

Me.MyPictureBox .Image = Image.FromFile( CStr(Me.txtMyPh otoPath.Value))

Problem is it is taking too long and slowing the app down. Is there another
faster way to achieve this? or to degrade the quality of image on the fly to
have to load smaller version of image for example?

Thanks

Regards
Jun 27 '08 #1
4 756
On May 8, 7:08*pm, "John" <i...@nospam.in fovis.co.ukwrot e:
Hi

I am using below statement to load an image;

Me.MyPictureBox .Image = Image.FromFile( CStr(Me.txtMyPh otoPath.Value))

Problem is it is taking too long and slowing the app down. Is there another
faster way to achieve this? or to degrade the quality of image on the fly to
have to load smaller version of image for example?

Thanks

Regards
Would you try:

MyPictureBox.Im ageLocation = "c:\image\image .JPG" ' Enter yours

thanks,

Onur
Jun 27 '08 #2
John,

It should go as slow as every other tool that reads an image.

But why is that CStr(Me.txtMyPh otoPath.Value)) , do you have more of this
kind of senseless code in your class?
It smells if you have used only objects and is all the time boxing and
unboxing.

Cor

"John" <in**@nospam.in fovis.co.ukschr eef in bericht
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
Hi

I am using below statement to load an image;

Me.MyPictureBox .Image = Image.FromFile( CStr(Me.txtMyPh otoPath.Value))

Problem is it is taking too long and slowing the app down. Is there
another faster way to achieve this? or to degrade the quality of image on
the fly to have to load smaller version of image for example?

Thanks

Regards
Jun 27 '08 #3
Is Me.txtMyPhotoPa th.Value.ToStri ng better? The field is an Infragistics
UltraText field bound to a table.

Regards

"Cor Ligthert[MVP]" <no************ @planet.nlwrote in message
news:44******** *************** ***********@mic rosoft.com...
John,

It should go as slow as every other tool that reads an image.

But why is that CStr(Me.txtMyPh otoPath.Value)) , do you have more of this
kind of senseless code in your class?
It smells if you have used only objects and is all the time boxing and
unboxing.

Cor

"John" <in**@nospam.in fovis.co.ukschr eef in bericht
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
>Hi

I am using below statement to load an image;

Me.MyPictureBo x.Image = Image.FromFile( CStr(Me.txtMyPh otoPath.Value))

Problem is it is taking too long and slowing the app down. Is there
another faster way to achieve this? or to degrade the quality of image on
the fly to have to load smaller version of image for example?

Thanks

Regards

Jun 27 '08 #4
John,

Normally that path is given at a string, so what type is that value.

The ToString can never be needed here (or it should be an object) as a path
contains forever (special) characters.

If it is an object the ToString acts in my idea the same as CStr while the
latter makes it only less understandable)

Cor

"John" <in**@nospam.in fovis.co.ukschr eef in bericht
news:OR******** *****@TK2MSFTNG P04.phx.gbl...
Is Me.txtMyPhotoPa th.Value.ToStri ng better? The field is an Infragistics
UltraText field bound to a table.

Regards

"Cor Ligthert[MVP]" <no************ @planet.nlwrote in message
news:44******** *************** ***********@mic rosoft.com...
>John,

It should go as slow as every other tool that reads an image.

But why is that CStr(Me.txtMyPh otoPath.Value)) , do you have more of this
kind of senseless code in your class?
It smells if you have used only objects and is all the time boxing and
unboxing.

Cor

"John" <in**@nospam.in fovis.co.ukschr eef in bericht
news:%2******* *********@TK2MS FTNGP06.phx.gbl ...
>>Hi

I am using below statement to load an image;

Me.MyPictureB ox.Image = Image.FromFile( CStr(Me.txtMyPh otoPath.Value))

Problem is it is taking too long and slowing the app down. Is there
another faster way to achieve this? or to degrade the quality of image
on the fly to have to load smaller version of image for example?

Thanks

Regards

Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
7417
by: Jordanakins | last post by:
Usenet, I am currently working on my website and am needing to detect the connection speed of the client. I would like to do this in PHP and not use any other languages. This makes it a bit more complicated. I know it is possiable to do this in PHP but I can't think of how. All I need to figure out is if they are on dial up or not. It...
1
1345
by: Vitamin | last post by:
if a page always have some picture that totally have near 250k does this a main point of affect the loading speed?
60
10099
by: Neil | last post by:
I have a situation with an ODBC linked view in an Access 2000 MDB with a SQL 7 back end. The view is scrolling very slowly. However, if I open the view in an ADP file, it scrolls quickly. I needed to use an ODBC link for the view because it needs to be editable. Otherwise, I would have used a pass-through query. In previous discussions...
5
5774
by: Sharon | last post by:
I’m writing a Windows application. In the form I have a Panel and inside the panel I have a PictureBox control. I’m loading the PictureBox control with BMP image that has the following criteria: 14174 x 7874 Pixels (111.61MPixels), 1 BitsPerPixel, 3200x3200 DPI, No Compression. The memory consumption for loading this image should be...
17
2498
by: sloank | last post by:
anyone know how to set up a 'speed bump'. once someone clicks on an external link on my website, I want a page to come up that says you are leaving my site, with an OK button. once the OK button is clicked I want to go to the original link that was clicked on. any ideas.
8
3020
by: Alexander Fischer | last post by:
Hello, I am writing a gallery script and use imagecreatefromjpeg and fpassthru to output images without any change to them (i.e., no thumbnail creation etc. - just deliver the image via the php script). However I note that the image creation is quite slow - the user can see that the image is created line-by-line, from top to bottom. Most...
2
2741
by: jphelan | last post by:
Ever since I successfully applied some techniques for increasing the speed of my 17 meg. Application; it has only made me hunger for more. First, let me list what I have done so far: 1. Split the application and database into front and back-ends, 2. Increased the load-time of my application by "pre-loading my heaviest forms when the...
5
1419
by: =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?= | last post by:
I am experiencing a lot of speed issues on initial app loads where we are referencing 3rd party 1.1 assemblies from 2.0 code. Those 1.1 assemblies reference things like System.Windows.Forms (totally unnecessarily I might add). I'm assuming our memory footprint will practically double by re-loading the System, System.Web,...
7
2071
by: Peted | last post by:
Hi, im hoping someone cane provide or point to a definitive accurate explantion of dotnet compilation when run and the best way to optimise peformace when dotnet code is run first time and execution speed after compliation. Ive searched the net and seem to find various opinions on what actually happens when you compile and run a c#...
0
7673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2085
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.