Forum Moderators: open
I've found two dozen commercial scripts, but unlike the php world, I cannot seem to find a single free script (that doesn't need 3rd party solutions).
Any help is greatly appreciated, thank you...
Mac
[asp101.com...]
asp101 [asp101.com] itself is a pretty good resource and searchable.
If you have a little money to put into it my company uses and I have used SoftArtisan's FileUp. You can get it for around $300. It works great and the code is incredibly simple. Here's the link for that:
I've heard good things about aspUpload. Also, .net makes uploads very easy to code.
Yes, I like AspUpload myself. I use it to upload image files to my server.
They also have a thumbnail live demo that lets you take images off your computer, upload them to a directory on your server and resize them with the end result that the thumbnail displays in the browser. I suppose you can right-click on it save it then upload that. The name of this is ASPJpeg and they have a live demo and they let you download the code for free to fool around with. I don't know if I can post the url so I won't but if you want it just email me.
I did have a problem with it however, When I tried to use it on my server, I could not get the thumbnail to display in my brower after the changes were made. Is this because I don't have a special component installed on my server?
Gerry
ASPUpload and ASPJpeg in tandom will let you upload a file, resize, compress, add copyright and other stuff and then let you save it to disk.
Both are not free, and both require being installed on the server, but are well worth it as they are great little progs to have!
Ah, I do not have access to the server. Will I have to have my ISP install ASPJpeg component? ASPUpload works for me ie; I can upload images to my remote server into a pre-determined directory where my site is located but I can't get ASPJpeg to display the thumbnail in the browser, is my ISP missing this component hence no thumbnail display? The code works fine.
Gerry
Yes I do have friendly messages turned off.
I got this script that detects the server components installed on my server and I think ASPJpeg isn't installed:
Detecting Components:
NOT FOUND: Smart Image Processor Own component
NOT FOUND: ASPJpeg Server Component
FOUND: ASPImage Server Component
NOT FOUND: ASPSmartImage Server Component
NOT FOUND: ImgWriter Server Component
NOT FOUND: AspThumb Server Component
NOT FOUND: ASP.NET Server Component
Gerry
You can also save images as JPEGs and determine exactly what how much compression to use. You can choose linear or bicupic resizing, and high or low quality.
System.Drawing contains all the functionality to work with images.
Of course, it's very poorly documented in the official Microsoft documentation :(
Also, don't store images in a database, store the file on the server, and store the location of the file in the database.
Also, don't store images in a database, store the file on the server, and store the location of the file in the database
I think that is what we were talking about. Eventually, I'd like to use the thumbnail re-sizing script as part of a form that allows my users to upload images using ASPupload then create thumbnails using ASPJpeg.
Eventually the information ie; path to the image files thumbnails and original Jpeg file will be put into a database. But for some reason, using ASPJpeg script won't display the completed thumbnail in my browser.
I think it's because I do indeed need that ASPJpeg server component that's not on my server. If there is another way around doing this please let me know.
Gerry
It's not documented very well in the MSDN, but if you search the web you can find some code samples that will help you figure it out.
As far as resizing the graphics files a la "Photoshop" on the fly from a classic ASP server is concerned, this would involve binary read & write to the file, interpreting the internal file format of the JPG files (including reading and decompressing the actual images), and some fairly intense graphics programming. Even as a custom component, it's likely more cost effective to simply get something off-the-shelf, rather than to try to code this yourself, particularly for a non-profit.
On the asp.net form, make the html look like this:
<form id="Form1" method="post" enctype="multipart/form-data" runat="server">
<input id="inpAttach" type="file" runat="server"> <asp:button id="btnAttach" runat="server" text="Attach" cssclass="button"></asp:button>
</form>
On the click event for the button, put some code like this (VB.NET code, similar code works in C#):
Private Sub btnAttach_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles btnAttach.Click
If inpAttach.PostedFile.FileName.Trim().Length > 0 Then
drAttach.strDescription = System.IO.Path.GetFileName(inpAttach.PostedFile.FileName)
Dim abyte(inpAttach.PostedFile.ContentLength - 1) As Byte
inpAttach.PostedFile.InputStream.Read(abyte, 0, inpAttach.PostedFile.ContentLength)
'Do something with the contents of the file in abyte.
End If
End Sub
The contents of the file in abyte can then be written to a file or a database field, or whatever.
To display the picture is more difficult.
In their you'll find image upload stuff written entirely in ASP Classic.
You may need to check the copyright though, but I'm sure they wouldn't mind you taking a peek to see how its done - i mean they're giving away a crippled version free anyway...
For non-profit as well.
This is what needs to happen.
I have an admin page that uploads to a blob field whatever image, but Im running into a problem.
Thumbnail creation from SQL Blob. (without just using the <IMG> tag for this.. I need to physically create or 'response.binarywrite' the thumbnail to minimalize size on the hd.
I have not found ANY free solutions for this.
Anyone have any information or anything recent? I've been using ASP.Net as the method of upload, although I can easily change to classic ASP, just need a single way it'll work. Its just the thumbnail that I'm concerned with getting into blob format.
Anyone recommend anything?
Thanks!
Jason
'big asp guy'
Hope this helps!
~Ruben Clark