...

View Full Version : dynamic png



ghell
12-12-2003, 08:19 PM
i have seen this done beore but it seems only in php

what is it and how is it done? i doubt it can be done in asp but it would be good if it could :p

btw, for those of u who havnt seen, you go to somewhere and variables or something get written into the png or something

Roy Sinclair
12-12-2003, 08:56 PM
In .NET (the successor to ASP) it's quite simple.

ghell
12-13-2003, 10:21 AM
i think i have ASP.NET on my server (its checked in the list) but how do i do it? ill look for a tutorial and the hex in pngs etc but any help would be appreciated greatly :)

ghell
12-13-2003, 10:32 AM
ok i found somethng here http://authors.aspalliance.com/chrisg/default.asp?article=152 so hopefully i wan work out how to do it with it :)

ghell
12-13-2003, 11:53 AM
hmm
how can i put querystrings into it, i cna get it working the 1st time but i dont know if it caches or what after that, it only works the 1st time anyway

if its caching, can i stop it from doing that apart from on my local machine?

Mhtml
12-15-2003, 01:44 PM
It can be done in ASP! You just need to know how PNG works, after that is quite simple. However, it is of course harder than jpeg or bmp and if you've never actually written file loaders before it will be hard.

Roy Sinclair
12-15-2003, 04:35 PM
Originally posted by ghell
hmm
how can i put querystrings into it, i cna get it working the 1st time but i dont know if it caches or what after that, it only works the 1st time anyway

if its caching, can i stop it from doing that apart from on my local machine?

Are you saving the image on your server and then serving it or are you writing the image directly to the user. If the former it may be a case of sending the first image you created out over and over again because it's failing to overwrite the first image.

It may be time to show your code.

ghell
12-15-2003, 05:40 PM
i fixed the cacheing problem with
<%@ OutputCache Duration = "60" VaryByParam="*" %> in the .aspx file, it is not too hard, it is actialy done in vb and the aspx can read the vb file into the browser

anyone who wants to do this i reccoment that link i gave earlier as it is fantastic, but make sure you change the caching time as i said above

btw, that cacheing thing will cache for 60 seconds to make it faster etc, but if any gets, posts or querystrings change it will recache as a new image

Roy Sinclair
12-15-2003, 07:01 PM
So, you've got it working like you wanted? :)

ghell
12-15-2003, 07:02 PM
yes, that was a sorta lil summary thing ^_^

jeskel
12-15-2003, 08:43 PM
hum... don't want to hijack the thread but if someone has some good links to provide on how doing using classic ASP, it is more than welcome.
:)

Roy Sinclair
12-15-2003, 08:54 PM
Why? If you have ASP available you should also have .NET and since the .NET code is the evolution of the ASP code...

I realize that it may not always be possible, but if it is possible you should make all of your new development be .NET instead of ASP.

Assuming you've already passed those hurdles and truly have a need to do it using ASP and only ASP, the following Google search seems to come up with several ActiveX objects you can install and then call from ASP to do this.

http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=ActiveX+ASP+drawing

jeskel
12-16-2003, 08:57 AM
thanx a lot Roy... I started a project using classic ASP. I first want to finish that and then, hopefully, I'll feel comfortable enough with the classic ASP to move to .NET.

:)

ghell
12-16-2003, 05:13 PM
i prefer ASP to ASP.NET anyway, i think theres an ASP-XP or somit silleh like that out there somewhere, seems to do a lot for u and be powerful, but im 2 lazy to use it :p

Roy Sinclair
12-16-2003, 06:34 PM
I'm still a lot more comfortable in the ASP world than the ASP.NET one but if you want to keep current, ASP isn't going to be the vehicle.

ghell
12-16-2003, 07:37 PM
meh, people tell me that about xhtml and i cant really tell the prectical diff between it and normal html :p im sticking with normal asp anywho :D stubborn as i am

jeskel
12-16-2003, 10:36 PM
Originally posted by Roy Sinclair
I'm still a lot more comfortable in the ASP world than the ASP.NET one but if you want to keep current, ASP isn't going to be the vehicle.
I am more interested in achieving specific things rather than keeping current actually...;) In the dynami png case, .NET would be useful. I am even thinking to move to PHP actually... Tried a few stuffs with it and it seems pretty powerful as far as I can see.

ghell
12-17-2003, 05:09 PM
been there, done that, got the "ASP > php" t-shirt

i think asp is much simpler and more powerful, most of the arguments for php rather than asp are things like "it uses mysql".. and u can use mysql in asp anyway

i can understnad people who do a lot of C using php though because of the layout, it would make it easier to understand

Mhtml
12-18-2003, 01:28 PM
That and the fact it is just so much better. Easier to use, more powerful in parts, a little faster and writing a plugin is absolutely simple..not to mention it runs on both unix and windows servers easily.

:P

Caffeine
12-19-2003, 07:28 AM
Originally posted by Mhtml
That and the fact it is just so much better. Easier to use, more powerful in parts, a little faster and writing a plugin is absolutely simple..not to mention it runs on both unix and windows servers easily.

:P

If you are talking about asp classic, then yes; php is much better. I kind of regret that I chose the asp-way instead of php, when I bought books on both tech's.

Anyway, my impression is that asp.Net is more powerful than php, and even if asp.Net only can run on windows [as of today, it will be portable in the future], how often do you change platforms ?
After all[4] years of development I have never switched from windows >> unix or vice versa.

But let's not start another thread of "php vs asp" ;)

ghell
12-29-2003, 05:50 PM
agreed, i use clasic asp 99% of the time because i still find it better than php in general for my needs (being that im not making another clone of some online 99% text game)

but both run on my server so i can mix and match if i want as long as i dont SSI them together

btw mhtml, faster my arse, mysql is faster for smaller databases (1-5000 aparently) but other systems are better for bigger ones, anyway i ran speed tests on an asp and a php script and the asp came out a few 10ths of a second faster... err..what were we talkin about..



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum