473,396 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Image problems

Hi,

I created my website so that each menu and table is drawn with commands like
DrawRectangle and DrawString.
Each of these bitmaps is then stored on the server and then loaded into an
image or imagemap control, created dynamicly.

Here's a piece of the code:

Dim bm As Drawing.Bitmap
Dim fn10 As Drawing.Font
Dim pn2 As Drawing.Pen
Dim imCopyright As New WebControls.ImageMap
Dim dsUpdate As New Data.DataSet

dsUpdate.ReadXml(Request.PhysicalApplicationPath + "\update.xml")

bm = New Drawing.Bitmap(800, 40)
bm.SetResolution(200, 200)

Dim gph As Graphics = Graphics.FromImage(bm)

fn10 = New Font("Arial", 10, FontStyle.Regular, GraphicsUnit.Pixel)
pn2 = New Pen(Color.DarkSlateGray, 2)

gph.Clear(Color.SlateGray)
gph = CreateArea(gph, pn2, Brushes.Gray, New Point(5, 5), New Size(785,
25))
gph = DrawText(gph, fn10, Brushes.DarkSlateGray, "Design and programming ©
2007", New Point(15, 5), New Size(645, 10), "left")
gph = DrawText(gph, fn10, Brushes.DarkSlateGray, "Quotes from
http://www.quotegarden.com/", New Point(15, 18), New Size(645, 10), "left")
bm.Save(Request.PhysicalApplicationPath + "\sessiondata\" +
Session("user") + "_CopyrightView.png", Imaging.ImageFormat.Png)

Dim yy As Integer

yy = 600 + top
imCopyright.Style("top") = yy.ToString + "px"
imCopyright.Style("Left") = "0px"
imCopyright.Style("Position") = "Absolute"
imCopyright.ImageUrl = "~\sessiondata\" + Session("user") +
"_CopyrightView.png?" + Trim(Str((RandomNumber())))
imCopyright.Visible = True
Me.Controls.Add(imCopyright)
The first few times it works fine, but after a while going to the menu's
testing stuff, a lot of times the images aren't shown.
I just get the little pictogram usualy seen when the image is being loaded.
Doing a reload of the page via the reload button of IE, the page is shown
complete, but even then somtimes I have to reload it a few times.

How is this happening? Is my application going to fast for the browser?
Is this just a very bad approach? I hope not, spend quite a few hours on the
website now.

Can anyone please help me?

rg,
Eric


Jan 2 '07 #1
0 890

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

Similar topics

8
by: Jef Driesen | last post by:
I'm implementing some image processing algorithms in C++. I created a class called 'image' (see declaration below), that will take care of the memory allocations and some basic (mathematical)...
2
by: bissatch | last post by:
Hi, I am trying to write script that is run when a form is submitted. The form contains an image input field and when submitted, the image is uploaded, resized and added as binary information to...
3
by: Greg Heilers | last post by:
Hello everyone... If one has a <div> that is completely filled with a background-image; how does one style it so that the image *continues* to fill the <div> top-to-bottom, left-to-right; if...
7
by: karthikeyan | last post by:
Hi, I am having some problems hosting my website. Everything works fine in my local machine but when I upload to propduction server, my images won't load properly. I have my state configuration...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
0
by: David | last post by:
Hello all. I am trying to implement my first server control and have run into two problems that I cannot solve. I need the assistance of someone with more experience. My goal was to create an...
3
by: OptimalDesigns | last post by:
I'm trying to convert my website onto my CD drive (F:). Images are giving me problems due to lack of knowledge for sure. My image url looks like this ......
9
by: tshad | last post by:
This was posted before but the message got messed up (all NLs were stripped out for some reason). I have 2 labels that hold the name of different images on my .aspx page. <asp:Label ID="Logo"...
11
by: Chris Beall | last post by:
See http://pages.prodigy.net/chris_beall/Demo/photo%20block%20experiments.html I've ended up with what seems like a rather complex structure for what I thought would be a somewhat simple...
0
by: Independent | last post by:
Python programmers may find the application to decoding an encrypted map image format known as Memory Map to produce a standard PNG image file interesting. Someone obviously very well versed in...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.