473,739 Members | 11,596 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using aspjpeg in asp.net (vb.net) - Code conversion from asp

Hello I have a working code for asp that I want to use now in asp.net.
The code is included below.

With this code I create a red bar on the bottom of an image, in which
I give some comment on the image and the URL of the website. In the
code image.asp I define the file name of the image (img), the comment
(txt) and the url (url). In the later stage in the project, this info
will be created dynamically depending on the requested image. The code
of sendbinary creates on the fly a new image, based on the 3

I want to have this code now in vb.net to use it in my new asp.net web
application. Calling the current sendbinary.asp from an asp.net page
doesn't work.

Can someone please help me to rewrite this code?

Many thanks in advance!

--- Code of image.asp ---

<TITLE>AspJpe g - Image with comment in red bar</title>

img = Server.URLEncod e(Server.MapPat h("img014.jpg") )
txt = Server.URLEncod e("014 Comment on bottom of image")
url = Server.URLEncod e("www.domain.c om")
<IMG src="sendbinary .asp?img=<%=img %>&text=<%=txt% >&url=<%=url%>" ><BR>


--- End of code test.asp ---

--- Code of sendbinary.asp ---

Set Jpeg = Server.CreateOb ject("Persits.J peg")
Jpeg.Open(Reque st("img"))

Set OK = Server.CreateOb ject("Persits.J peg")
OK.Open(Server. MapPath("empty. jpg"))

OK.Width = Jpeg.Width
OK.Height = Jpeg.Height + 21
OK.DrawImage 0, 0, Jpeg

OK.Canvas.Font. Color = &HFFFFFF 'white
OK.Canvas.Font. Family = "Arial"
OK.Canvas.Font. Size = 16
OK.Canvas.Print 10, Jpeg.Height+2, Request("text")
OK.Canvas.Print Jpeg.Width-134, Jpeg.Height+2, Request("url")

OK.Quality = 95


--- End of code sendbinary.asp ---
Nov 19 '05 #1
0 1121

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

Similar topics

by: Paul | last post by:
Just wondering if there is a way to give a control focus when the page loads, for example so the user could start typing in a text box before clicking on it? Thanks, -- Paul G Software engineer.
by: veera | last post by:
Is it possible to give control focus using Asp.net code??
by: | last post by:
Hello, I would like to do the following from a asp.net button click: <form method="POST" action="https://www.1234.com/trans_center/gateway/direct.cgi"> <input type="hidden" name="Merchant" value="Merchant Name"> <input type="hidden" name="OrderID" value="Unique OrderID value"> <input type="hidden" name="email" value="Customers email address (OPTIONAL)">
by: Coleen | last post by:
Hi All :-) This may be a duplicate post, so I apologize if it is, but I could not find the one I sent last week posted... I have an HTML table that I am using to store session variables from other pages within our web-application. In this table, I need to format the rows & cells to be right aligned. I am using this code: tbl_tax_subtotals.Rows(1).Cells(2).HorizontalAlign = HorizontalAlign.Right
by: Samuel Shulman | last post by:
Hi I would like to allow user to 'POST' to another page but I want to send the query from the server i.e.. I want the user to click a button to say register the request, add up the fields that I want to send in the POST request and POST it to that page Any sample code? Thank you,
by: =?Utf-8?B?Sm9obiBTLg==?= | last post by:
I programmed a dropdownlist via javascript and now I need to read the value from vb.net code (server side) . Then based on the value I will branch to seperate logic. How do I call a client javascript function from vb.net and return the value to it as well?
by: .nLL | last post by:
Hi, i am new to asp.net, im working o sample project to learn and i want to be able to access code once i finished it. Im using visiual web developer 2008 and it compiles code as dll in bin folder. I dont want that, becaouse i want to be able to edit my code when i dont have vs installed. how can i achive so code would be compiled in run time?
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.