ANBSThumbImg + ANBSThumbLink

Creates thumb of an image with or without link to original
Use ANBSThumbLink to create thumb and link to original image
Use ANBSThumbImg to create thumb without link
Uses Thumbnail3.aspx and fancybox for larger image (both attached)
Latest fancybox3 can be found here.
Thumbnail3.aspx was found online, and then enhanced to meet my needs.


Public

Tested

My Own Work
Function ANBSThumbLink(Img, ToWidth, ImgClasses)
 ' Creats a link to enlarge image
 ' That image is actually resized using thumbnail3.aspx
 'Needs: ANBSThumbImg and FancyBox
 ' <a href=""""><img src="/Assets/thumbnail3.aspx?h=200&f=Dir_Img/AlwahOld.jpg" class="img-thumbnail" /></a>
 FancyBox     = ""
 If ToWidth = "" Then ToWidth = "200"
 Rett      = ""
 Rett      = Rett & "<a href=""" & Img & """ data-fancybox=""fancybox"" "
 Rett      = Rett & ">"
 Rett      = Rett & ANBSThumbImg(Img, ToWidth, ImgClasses)
 Rett      = Rett & "</a>"
 Rett      = Rett & ""
 ANBSThumbLink   = Rett
End Function
Function ANBSThumbImg(Img, ToWidth, ImgClasses)
 ' That image is actually resized using thumbnail3.aspx
 'Needs: ThumbASPX
 ' <img src="/Assets/thumbnail3.aspx?h=200&f=Dir_Img/AlwahOld.jpg" class="img-thumbnail" />
 ThumbASPX    = Dir_Thumbnail3aspx ' full path and file for thumbnail3.aspx
 Rett      = ""
 Rett      = Rett & "<img src=""" & ThumbASPX & "?h=" & ToWidth & "&f=" & Img & """ class=""" & ImgClasses & """ "
 Rett      = Rett & "/>"
 ANBSThumbImg   = Rett
End Function

Img, ToWidth, ImgClasses

To create an image with click to enlarge
Call ANBSThumbLink("myimage.png", 200, "img-thumbnail")

To create an image only with no click
ANBSThumbImg("OurImg.jpg", 10, "")

Views 121 Downloads 27

Classic ASP Multimedia
ANmarAmdeen
660
Attachments
Revisions

v3.0