473,399 Members | 3,106 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,399 software developers and data experts.

temporary save images

Hello and Merry Christmas!
I flip in my card play some cards using the call "drawimage". These flipped
cards are saved in temporary images on the server: temp1.jpg, temp2.jpg...
Everything works fine if only one user plays. It seems to be better so save
these temp. images on the local pc. How to do it? Is there some other
solution of this problem?
Thanks for your help!
Mario
Dec 25 '06 #1
8 1678
"Mario Krsnic" <pd********@sofortsurf.dewrote in message
news:em*********@online.de...
It seems to be better so save these temp. images on the local pc. How to
do it?
You have (almost) no chance of doing this because of security reasons... If
you can save an image onto your users' hard disk, you could also save a WMI
script into their startup folder which deletes files next time they start
their computer...?
Is there some other solution of this problem?
Why does anything need to be saved anywhere...?
Dec 25 '06 #2

You don't control this. The browser caches images.

The easiest solution is to use a GUID filename

string s = System.Guid.NewGuid.ToString()
(.Format(""))

(the .Format has some overload which removes {} and -, but I don't remember
it offhand.

s += ".jpg"

something like that.

"Mario Krsnic" <pd********@sofortsurf.dewrote in message
news:em*********@online.de...
Hello and Merry Christmas!
I flip in my card play some cards using the call "drawimage". These
flipped
cards are saved in temporary images on the server: temp1.jpg, temp2.jpg...
Everything works fine if only one user plays. It seems to be better so
save
these temp. images on the local pc. How to do it? Is there some other
solution of this problem?
Thanks for your help!
Mario


Dec 25 '06 #3
Mario Krsnic schreef:
I flip in my card play some cards using the call "drawimage". These flipped
cards are saved in temporary images on the server: temp1.jpg, temp2.jpg...
Everything works fine if only one user plays. It seems to be better so save
these temp. images on the local pc. How to do it? Is there some other
solution of this problem?
Why do you generate the images all the time? Generate all the possible
image once... And then for each 'play' you simply generate html that
points to different images? This way, the browser can notice that he has
already downloaded the given image(eg: shadesnine.jpg).. And look it up
in his cache...
--
Tim Van Wassenhove <url:http://www.timvw.be/>
Dec 25 '06 #4
>
Why does anything need to be saved anywhere...?
You mean, it is possible to flip the image and load it without saving it?
>

Dec 25 '06 #5
"Mario Krsnic" <pd********@sofortsurf.dewrote in message
news:em**********@online.de...
>Why does anything need to be saved anywhere...?

You mean, it is possible to flip the image and load it without saving it?
Sure, but why bother?
Dec 25 '06 #6
Hello Tim,
Why do you generate the images all the time? Generate all the possible
image once... And then for each 'play' you simply generate html that
points to different images? This way, the browser can notice that he has
already downloaded the given image(eg: shadesnine.jpg).. And look it up in
his cache...
Yes, it is better so. I have implemented it. It works well till the user
refreshes the page... Thank you!
Cheers
Mario
Dec 25 '06 #7
"Mario Krsnic" <pd********@sofortsurf.dewrote in message
news:em**********@online.de...
It works well till the user refreshes the page
So what happens when the user refreshes the page...?
Dec 25 '06 #8
Mark,
>
So what happens when the user refreshes the page...?
To see it, you can go to
http://www.krsnic.de/tarotspiel/Frage-per-E-Mail.aspx
and try it. You may navigate to the page in two browser windows and play
rolls of two users!
Dec 26 '06 #9

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

Similar topics

7
by: Larry | last post by:
Hi, I have unbelievable problems just to save a record! I make an input to a record in a subform, which has a temporary table as its recordsource. When I am done, and want to save the...
3
by: Angus | last post by:
I have a web page with a toolbar containing a Save button. The Save button can change contextually to be a Search button in some cases. Hence the button name searchsavechanges. The snippet of...
2
by: RussCRM | last post by:
I want to use a command button, say "cmdDisplayImage" to display/ transfer a captured image from the ezVidCap1 control to an image or OLE box on the same form such as "PhotoPreview" (not sure...
1
by: ahmed mahmoud | last post by:
I want to save a composite Object to mysql database. I mean if i have Object A which has attributes of primitive data types and array of Object B. So how can i save the array of B
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.