Click here to Skip to main content
Email Password   helpLost your password?

Sample Image - ThumbTools2-1.jpg

Important: Version 2 compiled with CxImage 6.00 - Supports all file types.

Introduction

Some months ago, I wrote an article about a C# class that generates thumbnails and a reusable ASP.NET user control that displays thumbnail views. Several people asked me to port my solution to classic ASP. I found some time to do it and here I present the results. The ASP solution is functionally equivalent to that of ASP.NET (in fact, many pieces of code have been translated from C# to VBScript). Only some advanced options are missing (comments showing and editing, beveled thumbnails, thumbnail caching, thumbnail saving) because they are difficult to be implemented in classic ASP. The solution for thumbnail views is reusable and easy to use. You only have to make a virtual include and call a server function inside a form. To generate the thumbnail data in JPEG format, I created an ATL-COM object that is a wrapper of the CxImage class of Davide Pizzolato. CxImage is a C++ class to load, save, display, transform BMP, JPEG, GIF, PNG, TIFF, MNG, ICO, PCX, TGA, WMF, WBMP, JBG, and J2K images. The COM wrapper object could be useful for other tasks also. For example, you could create a Web page that lets users apply image processing algorithms on their images.

In this article, I will describe how to use the thumbnail tools and also the important parts of the code.

How to Create a Single Thumbnail and Thumbnail Views

The ASP part of the thumbnail solution consists of the files ThumbGenerate.asp and ListThumbs.inc. After downloading the zip and extracting the files, make the containing ThumbAsp folder a virtual directory and point the browser to the TestListThumbs.asp page. This is a test page, an instance of which is shown in the figure above. Enter in the Virtual Path textbox a path of an IIS virtual-directory containing images, and press the 'Submit' button. You should see the thumbnails of the images residing in that directory. Try the other choices also and see the changes on the thumbnails.

ThumbGenerate.asp is a VBScript code file that can be used in an <img> tag to produce a thumbnail dynamically in JPEG format. A typical use of the ASP file is shown below. The <a> link points to an image and the <img> tag specifies a dynamically generated thumbnail of the same image via its src attribute value.

<a href='http://www.codeproject.com/santorini/SANTO007.jpg'>
<img src='http://www.codeproject.com/ThumbAsp/ThumbGenerate.asp?
    VFilePath=/santorini/SANTO007.jpg&
    Width=200&Height=200&Quality=75'
        border=0 alt='Name: SANTO007.jpg'/></a>

Parameters to the ASP file are given in the form of a query string. They are the following:

PPT-file thumbnails using the shell-thumbnail extract object

ListThumbs.inc is an ASP file that creates thumbnail views. To use it in an ASP page, you have to include the file as follows:

<!-- #include virtual ="/ThumbAsp/ListThumbs.inc" -->

In the position you want the thumbnail view, you call the ListThumbs function that has the following syntax:

ListThumbs(VPath,Columns,Filter,AllowPaging,PageSize,Width,Height,_ 
           Quality, AllowStretch,ShowFilenames,ShellThumbnails)

The parameters of the ListThumbs function have the following meaning:

ListThumbs.inc and ThumbGenerate.asp must be contained in the same virtual directory. Of course, you must register the COM objects also.

Source Code Explanations

As mentioned above, the CxImageATL object is a wrapper around the CxImage imaging class. This class has functions to load and save in all popular image formats and also various image processing and manipulation functions. For the thumbnail generation, the Resample function is used. I added a new function called ImageForASP that returns the image as a Variant byte array using any supported image format. The returned variant ImageData can be used to display the image from an ASP page by calling Response.BinaryWrite ImageData. The ImageType parameter defaults to 2 (JPEG), and the Quality parameter defaults to 75 and is used only for the JPEG format.

// method to display image in ASP pages
STDMETHODIMP CCxImage::ImageForASP(long ImageType, long Quality,
                                   VARIANT *ImageData)
{
    SAFEARRAY *psaData; BYTE *pData,*pBuffer; long size;
    SAFEARRAYBOUND rgsabound[1];
 
    m_image.SetJpegQuality((BYTE)Quality);
    CxMemFile memfile; memfile.Open();
    bool bOk = m_image.Encode(&memfile, ImageType);
    if(!bOk) return E_FAIL; // NO-IMAGE
    pBuffer=memfile.GetBuffer();
    size=memfile.Size();
 
    // create safe array and copy image data
    rgsabound[0].lLbound = 0; rgsabound[0].cElements = size;
    psaData = SafeArrayCreate(VT_UI1, 1, rgsabound);
    SafeArrayAccessData(psaData, (void **)&pData);
    memcpy(pData,pBuffer,size);
    SafeArrayUnaccessData(psaData);
    free(pBuffer);
    // put data in variant
    ImageData->vt = (VT_ARRAY | VT_UI1);
    ImageData->parray = psaData;
    return S_OK;
}

ThumbExtract.dll has an equivalent function called ThumbJpgData that returns thumbnail image data in JPEG format (CxImage files were used again). Below is the code of the ThumbGenerate.asp file. The only tricky part was how to retain the aspect ratio of the original image. Notice also that the bit depth of the original image must be increased to 24 bits since JPEG does not support indexed images.

<%
Set fso = Server.CreateObject("Scripting.FileSystemObject")
 
Response.ContentType = "image/jpeg"
' ---- parameter parsing ----'
Dim VFilePath,FilePath,Width,Height,Quality,bShellThumbnails,
    bStretch,bCreate
VFilePath = Request("VFilePath")
If Len(VFilePath)=0 Then VFilePath="NoThumb.gif"
FilePath = Server.MapPath(VFilePath)
If Not fso.FileExists(FilePath) Then
  FilePath = Server.MapPath("NoThumb.gif")
End If
If Len(Request("Width"))>0 Then
  Width = Int(Request("Width"))
Else Width = 200
End If
If Len(Request("Height"))>0 Then
  Height = Int(Request("Height"))
Else Height = 200
End If
If Len(Request("Quality"))>0 Then
  Quality = Int(Request("Quality"))
Else Quality = 75
End If
If Len(Request("ShellThumbnails"))>0 Then
  bShellThumbnails = (Request("ShellThumbnails")="True")
Else bShellThumbnails = False
End If
If Len(Request("AllowStretch"))>0 Then
  bStretch = (Request("AllowStretch")="True")
Else bStretch = False
End If
 
Dim BinData
If bShellThumbnails Then
 ' Create COM Shell Thumbnail object
  Set objThumb = Server.CreateObject("ThumbExtract.FileThumbExtract")
  Call objThumb.SetPath(FilePath)
  Call objThumb.SetThumbnailSize(Width,Height)
  Call objThumb.ExtractThumbnail
  BinData = objThumb.ThumbJpgData(Quality)
Else
 ' Create COM CxImage wrapper object
  Set objCxImage = Server.CreateObject("CxImageATL.CxImage")
  Call objCxImage.Load(FilePath,GetFileType(FilePath))
  Call objCxImage.IncreaseBpp(24)
  ' determine thumbnail size and resample original image data
  If Not bStretch Then ' retain aspect ratio
     widthOrig = CDbl(objCxImage.GetWidth())
     heightOrig = CDbl(objCxImage.GetHeight())
     fx = widthOrig/Width
     fy = heightOrig/Height 'subsample factors
     ' must fit in thumbnail size
     If fx>fy Then f=fx Else f=fy  ' Max(fx,fy)
     If f<1 Then f=1
     widthTh = Int(widthOrig/f)
     heightTh = Int(heightOrig/f)
  Else
     widthTh = Width
     heightTh = Height
  End If
  Call objCxImage.Resample(widthTh,heightTh,2)
  BinData = objCxImage.ImageForASP(2,Quality)
End If
 
' output in Response '
Response.BinaryWrite BinData
 
Function GetFileType(sFile)
  dot = InStrRev(sFile, ".")
  filetype=2
  If dot > 0 Then sExt = LCase(Mid(sFile, dot + 1, 3))
  If sExt = "bmp" Then filetype = 0
  If sExt = "gif" Then filetype = 1
  If sExt = "jpg" Then filetype = 2
  If sExt = "png" Then filetype = 3
  If sExt = "ico" Then filetype = 4
  If sExt = "tif" Then filetype = 5
  If sExt = "tga" Then filetype = 6
  If sExt = "pcx" Then filetype = 7
  GetFileType=filetype
End Function

%>  

The source code of the ListThumbs.inc file is listed next. It is essentially a translation from C# to VBScript from my previously presented ASP.NET thumbnail user control. The output that the ASP.NET DataList control produces can be easily implemented by constructing an HTML table with code. The Columns parameter determines where the row (<tr>) tags are placed. However, the editing capabilities of the DataList control are much more difficult to be implemented with ASP code. For this reason, I did not implement thumbnail comments editing and presentation in this version.

<%
 
Function ListThumbs(VPath,Columns,Filter,AllowPaging,PageSize,Width,Height,Quality,
                    AllowStretch,ShowFilenames,ShellThumbnails)
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set ScriptName = Request.ServerVariables("SCRIPT_NAME")
  ScriptPath = Left(ScriptName,InstrRev(ScriptName,"/"))
  If Right(VPath,1)<>"/" Then VPath=VPath & "/"
  path = Server.MapPath(VPath):  If Right(path,1)<>"\" Then path=path & "\"
  ' analyze filter string
  If Len(Filter)=0 Then Filter = "*.gif;*.jpg;*.bmp"
  arSuffixes = Split(Filter,";")
  For i=0 To UBound(arSuffixes)
   pos=Instr(1,arSuffixes(i),".")
   If pos>0 Then arSuffixes(i) = Mid(arSuffixes(i),pos) ' e.g. ".gif"
  Next
  Dim CurPage,TotalPages
  ' -- write client script and hidden field for current page and path
  If AllowPaging Then Call WriteGotoPageScript
  If Len(Request.Form("hdnCurPage"))>0 Then
    CurPage = CInt(Request.Form("hdnCurPage"))
  Else CurPage=1
  End If
  Response.Write "<input type='hidden' name='hdnCurPage' value='" &_
                 CurPage & "' />" & vbCrLf
                ' restart page numbering if different page
  If Request.Form("hdnPrevPath")<> VPath Then CurPage = 1
  Response.Write "<input type='hidden' name='hdnPrevPath' value='" &_
                  VPath & "' />" & vbCrLf
 
  Dim arrFilesAll(),ubn
  If fso.FolderExists(path) Then
    Set oFolder = fso.GetFolder(path)
    For Each oFile in oFolder.Files
      bFileInFilter=False
      For i=0 To UBound(arSuffixes)
        If IsFileOfType(oFile.Name,arSuffixes(i)) Then bFileInFilter=True
      Next
      If bFileInFilter Then
        ReDim Preserve arrFilesAll(ubn)
        arrFilesAll(ubn) = oFile.Name
        ubn=ubn+1
      End If ' if in filter
    Next
   End If
 
  If AllowPaging Then
   TotalPages = CInt(ubn/PageSize)
   If ubn Mod PageSize>0 Then TotalPages = TotalPages + 1
   if TotalPages=0 Then TotalPages=1
    ' make sure current page is in the [1,totalPages] range
   if CurPage>TotalPages  Then
     CurPage=TotalPages
   else
     if CurPage<1 Then CurPage=1
   end if
   ' range of files to read
   StartIndex = (CurPage-1)*PageSize
   EndIndex = CurPage*PageSize
   If ubn < EndIndex Then EndIndex = ubn
  Else
   StartIndex = 0: EndIndex = ubn
  End If
  ' write thumbnail hrefs
  If fso.FolderExists(path) Then
    Response.Write "<TABLE ALIGN='CENTER'>" & vbCrLf
    For index=StartIndex To EndIndex-1
      FileName = arrFilesAll(index)
      ' Response.write path & FileName
      Set oFile=fso.GetFile(path & FileName) : FileSize=oFile.Size
      nCol = nCol+1
      VFilePath = VPath & FileName
      sHREF = "<a href='" & VFilePath & "'>" & _
        "<img src='" & ScriptPath & "ThumbGenerate.asp?VFilePath=" & _
      Server.URLEncode(VFilePath) & "&Width=" &_
                  Width & "&Height=" & Height &_
                  "&Quality=" & Quality & _
                  "&ShellThumbnails=" & ShellThumbnails &_
                  "&AllowStretch=" & AllowStretch & _
                  "' border=0 alt='Name: " & FileName &_
                  "&#10;&#13;Size: " & CInt(FileSize/1024) &_
                  " Kb'/> </a>"
      If nCol = 1 Then Response.Write "<TR>"
       Response.Write "<TD align='Center' " & _
         "style='background-color:White;border-width:1px;" &_
         "border-style:Solid;font-size:8pt;'>" & vbCrLf
       Response.Write sHREF & vbCrLf
       If ShowFilenames Then Response.Write "<br/>" & FileName
       Response.Write "</TD>" & vbCrLf
       If nCol = Columns Then
         Response.Write "</TR>" & vbCrLf
           nCol = 0
       End If
     Next
     Response.Write NumImagesDisplayed(EndIndex-StartIndex,AllowPaging,ubn,_
                                       CurPage,TotalPages)
     If AllowPaging Then
       Response.Write CreateNavBar(VPath,CurPage,TotalPages,Columns)
     End If
     Response.Write "</TABLE>" & vbCrLf
  Else
    Response.Write "Directory Does Not Exist<P>" & vbCrLf
  End If
End Function
 
Function NumImagesDisplayed(NumDisplayed,AllowPaging,TotalFiles,CurPage,TotalPages)
 s = "<tr><td align='Center' colspan='" & Columns &_
     "' style='background-color:#FFFFC0;font-size:8pt;'>"
 s = s & NumDisplayed
 if AllowPaging  Then s = s & " of " & TotalFiles
 ' s = s & " images"
 if AllowPaging Then
   s = s & "  (Page " & CurPage & " of " & TotalPages & ")"
 end if
 s =  s & "</td></tr>"
 NumImagesDisplayed = s
End Function
 
Function CreateNavBar(VPath,CurPage,TotalPages,Columns)
if TotalPages = 1 Then Exit Function
s = "<tr><td align='Center' colspan='" & Columns &_
    "' style='font-size:8pt;'>"
if CurPage>1 Then
  'GoToPage client script updates hidden field with target page
  'and then causes a postback
  s =  s & "<A href=""javascript:GoToPage('" & VPath &_
         "'," & CurPage-1 & _
   ");"">&lt;&lt; Prev</A>  "
End If
for i=1 To TotalPages
  if i=CurPage Then
    s =  s & "<b>" & i & "</b>"
  else
    s =  s & "<A href=""javascript:GoToPage('" & VPath &_
                  "'," & i & ");"">" & _
     i & "</A>"
  end if
  s =  s & " "
  If i Mod 10=0 Then s = s & "<br/>"
Next
If CurPage<TotalPages Then
  s =  s & " <A href=""javascript:GoToPage('" &_
          VPath & "'," & CurPage+1 & _
   ");"">Next &gt;&gt;</A>  "
End If
s =  s & "</td></tr>"
CreateNavBar = s
End Function
 
Function IsFileOfType(afile,infile_type)
  IsFileOfType = (UCase(Right(afile,Len(infile_type)))=UCase(infile_type))
End Function
 
Sub WriteGotoPageScript
 Response.Write "<script language=""javascript"">" & vbCrLf & _
  "//<!--" & vbCrLf & "function GoToPage(vpath,n) { " & vbCrLf & _
  "document.forms(0).hdnCurPage.value=n;" & vbCrLf & _
  "document.forms(0).submit(); " & vbCrLf & _
  "}" & vbCrLf & "//-->" & vbCrLf & "</" & "script>" & vbCrLf
End Sub
 
%>

The GoToPage client JavaScript function that is "injected" in the HTML form implements page navigation. This function is executed at the client side when the user presses any of the page links. It sets the hdnCurPage hidden field's value equal to the argument n (that is the page number) and then submits the form. After postback, the page number is retrieved from the hidden field at page load.

Conclusion

I have not yet found on the Web any totally free ASP thumbnail solution, so I hope you'll find this article and the code useful. I recommend you to use the ASP.NET solution if you can, because it is faster and has more options. It seems that the imaging classes of .NET have optimized code. May be if you have a fast PC, you'll not notice the difference, but in my Pentium II, it is obvious.

History

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
Generalregistering the dll file ?
miller.j
3:21 14 Nov '09  
hello
how can i register the dll file so it will work ?
i have IIS 7 SERVER.
GeneralRe: registering the dll file ?
Philipos Sakellaropoulos
10:41 18 Nov '09  
Run the .msi file that you can find at
http://cximageatl.codeplex.com/[^]
GeneralUpdated version using CxImage 6.00 - jpg,tif,png,gif support
Philipos Sakellaropoulos
15:17 31 Oct '09  
Hi guys, after many requests I updated the CxImageATL wrapper COM object to use the CxImage 6.00 and added support for all image types that CxImage supports. Get also the new (corrected) scripts.
I uploaded them to rapidshare and I will post them to the codeproject site also.

http://rapidshare.com/files/300688268/ThumbAsp.zipx[^]

http://rapidshare.com/files/300688718/SetupCxImageATL.msi[^]
GeneralRe: Updated version using CxImage 6.00 - jpg,tif,png,gif support
HeyCoda
7:56 7 Nov '09  
Rapidshare is requiring premium membership to download the .msi file.
Would you please be so kind as to post it somewhere on the code project for us?
Many thanks again!
Coda
AnswerRe: Updated version using CxImage 6.00 - jpg,tif,png,gif support
Philipos Sakellaropoulos
21:16 8 Nov '09  
I have sent the msi to the site but they have not put it in the article. Send me an e-mail and I will send it to you. However, I think that you can download files from Rapidshare with free account.
GeneralRe: Updated version using CxImage 6.00 - jpg,tif,png,gif support
Philipos Sakellaropoulos
10:40 18 Nov '09  
I have also created a project in CodePlex. You can get the latest files from there.

http://cximageatl.codeplex.com/[^]
GeneralRe: Updated version using CxImage 6.00 - jpg,tif,png,gif support
HeyCoda
13:36 18 Nov '09  
AWESOME!
Thank you so very much for this tool!
Coda
GeneralDoes this script generate true thumbnails?
michaelmcguk
1:19 21 Oct '09  
Hi,

Does this script generate true thumbnails?

Or do I need to install a component(like ASPJPEG) to achieve this?


Many thanks.
GeneralRe: Does this script generate true thumbnails?
HeyCoda
6:14 23 Oct '09  
It's supposed to make thumbnails. You do have to download a .dll and register it.
I am getting an error even though I downloaded and intsalled the vanilla version.
If you can make it work you'll be ahead of the game!
Good luck!
GeneralRe: Does this script generate true thumbnails?
michaelmcguk
6:53 23 Oct '09  
Yikes.

I'm hoping to give it a shot on Tuesday on a dev server. Wish me luck Smile

How far did you get with your install of it? Did it throw up an error?

When you say 'Vanilla version', what do you mean? I've heard this term before Smile
GeneralRe: Does this script generate true thumbnails?
HeyCoda
7:24 23 Oct '09  
Vanilla = Source code as provided by the author.
I've actually made some progress. This morning I found that you have to put everything in the root directory of your site to avoid the error I reported the other day. I don't know why but -whatever.
ok, I was able to spend a hour on this after I got my kids home from school and it generates a thumbnail "View" of an image. I don't see any method of saving the generated thumbnail, which is what I need to do as well.
This version of the dll also doesn't work with pngs. jpgs and gifs show up just fine, but pngs don't. I sent an email to the author. Waiting for a reply.
Let's hope for the best huh? The potential is there in this tool, it is very cool. It just needs a little tweaking.
Coda
GeneralRe: Does this script generate true thumbnails?
michaelmcguk
6:51 24 Oct '09  
Hey Coda,

Pleased to get some dialogue on this script.
Was worried looking at the age of the comments that the support wasn't there.

You sound like you're progressing really well. I can let you know how I get on and if it works out.

Best of luck.

Yikes, I'm not sure if the author will get back to us. I only found a yahoo.gr email address.


Keep in touch Smile
GeneralRe: Does this script generate true thumbnails?
HeyCoda
14:01 25 Oct '09  
Yeah. I was kind of worried too.
The code does not work with .png images which means it is useless for my needs. No one seems to test with .png images before they claim it works with them.Confused I found a couple of other solutions that claimed they worked with pngs too but they don't. I thought the pngs I was using to test might have been corrupt or something but they aren't. I also did some research and found that other people have had no success getting the thumbnail scripts to work with pngs so it isn't my images that are the problem.
I guess the authors of these scripts just assume that they would work with pngs and did not test with them.Unsure
The script does not actually generate a new thumbnail image either. The displayed .gif or .jpg "Thumbnails" take just as long to download as the full sized images.
Darn. I really wanted this solution to be the one that worked.
Thumbs Down
GeneralRe: Does this script generate true thumbnails?
michaelmcguk
23:51 25 Oct '09  
Oh no.
So the 'Thumbnails' are just rescaled Full-Size images?
Surely notFrown

I might give it a shot tomorrow anyway, just to see how I get on. Will let you know how it goes.

Failing that, I may have to look to another solution. Possibly using the ASPJpeg component.
GeneralRe: Does this script generate true thumbnails?
HeyCoda
18:48 28 Oct '09  
Yeah, I think they are just resized from the main image. I did get an email back from the author. He said that the code does not work with pngs and that he is going to see about fixing it and uploading a new version. He didn't give me an eta but hey, I count myself lucky for even getting a response!
Hold off on the aspjpeg. I'm messing with a php module that can be called from within classic asp to create the thumbnails. Real thumbnails.
If it works I'm a hero. Wish me luck!
Coda
GeneralRe: Does this script generate true thumbnails?
Philipos Sakellaropoulos
16:25 31 Oct '09  
No, it generates a thumbnail of course.
The previous script had a bugFrown and emitted gif image not jpg, this is why it was very slow.
Sorry for the trouble
GeneralRe: Does this script generate true thumbnails?
Philipos Sakellaropoulos
16:23 31 Oct '09  
Hi, I read your comment about not able to save the thumbnail.
The scripts do not save the thumbnail but you can modify it to do so.
Use the Save(FileName,ImageType) method of the COM object.
You can also do some image processing with it.
If you want to see the methods supported install the OLEVIEW tool and open the CxImageATL library.
Hope that helps you.
GeneralRe: Does this script generate true thumbnails?
Philipos Sakellaropoulos
16:11 31 Oct '09  
Download the .msi file from my message above (updated). The msi will install and register the COM component that generates the thumbnails. The scripts use the COM component.
GeneralRe: Does this script generate true thumbnails?
HeyCoda
19:17 31 Oct '09  
THANK YOU THANK YOU THANK YOU!
This is awesome and exactly what I was looking for!
I hope something wonderful happens for you!
Thank you again!
Coda
General0x800A000D error
HeyCoda
9:38 20 Oct '09  
Hello,
I downloaded the source code and registered the .dll and put everything in folder called "ThumbTest". I have made no changes.
I am getting an error when I try to view the test page.
0x800A000D which is a "Type mismatch" error.

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'ListThumbs'
/ThumbTest/ThumbAsp/TestListThumbs.asp, line 69

Line 69 is where the function is called. It looks like this:
Call ListThumbs(VPath,Columns,aFilter,AllowPaging,PageSize,Width,Height,Quality,AllowStretch,ShowFilenames,ShellThumbnails)

Any insight would be greatly appreciated.
Thanks Sniff
QuestionFirefox Issue
dleonardmvs
6:01 8 Sep '08  
Great Tool! The javascript gotopage function doesn't seem to work in using the Firefox browser. IE works great! Is there something I'm missing, or need to look for? Thanks in advance.
AnswerRe: Firefox Issue
urobe
3:00 28 Nov '08  
u need 2 change the brackets in this way:

"document.forms[0].hdnCurPage.value=n;" & vbCrLf & _
"document.forms[0].submit(); " & vbCrLf & _


[ instead of (
] instead of )

sincerely
GeneralError on Windows Server 2003 64x
Deb Kozlovac
6:20 3 Sep '08  
This DLL fails when using the 64 bit version of Windows Server 2003. It is working fine on my Windows 2000 server.

Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object
/ThumbGenerate.asp, line 45

I had this same problem with ASP Upload. When I upgraded to the 64x version, it worked. Is there an updated version of the CxImage class that will work with this windows version?

Thanks.
QuestionError Type: Server object, ASP 0177 (0x800401F3)
Member 2894969
6:02 30 Jul '08  
Hi,

Nice tool but when i try the page TestListThumbs.asp i don't see the thumnails but red cross.
The dll is succefully registered.

The asp error code is:
When ShellThumbnails=True

Error Type: Server object, ASP 0177 (0x800401F3)
Invalid class string
/ero/uploads/ThumbGenerate.asp, line 38

And when ShellThumbnails=False
Server object, ASP 0177 (0x800401F3)
Invalid class string

The url is:

http://localhost/ero/uploads/ThumbGenerate.asp?VFilePath=/ero/uploads/logos/test.jpg&Width=200&Height=200&Quality=75&ShellThumbnails=False&AllowStretch=True


Please Help.

Thanks,

Yves.
AnswerRe: Error Type: Server object, ASP 0177 (0x800401F3)
Member 2894969
8:57 30 Jul '08  
Hi,

I found the solution.
This is a problem of permissions.

Solution:

Check the registry:
Run Regedit

Expand HKEY_CLASSES_ROOT and find CxImageATL
Right-Click the key and select "Permissions..." of via the menu.

also check the permissions user for the dll.


Last Updated 19 Nov 2009 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2010