Asp ile thumbnail almak veya upload ederken ?
4
●1.309
- 28-01-2009, 18:17:47aspjpeg ile yapabilirsin.
AspJpeg.com - Advanced Image Resizing Component for ASP/ASP.NET/IIS da dökümanlar mevcut. - 28-01-2009, 20:39:36Asp'de bu işlem o kadar kolay değil ne yazık ki. Server'a bir eklenti kurulması gerekiyor.
ASP.NET için thumbnail oluşturma burada mevcut;
ASP.NET images: Thumbnails : ASP Alliance
ASP'de bu işlem PHP'de olduğu kadar kolay değil maalesef. - 28-01-2009, 21:31:12Üyeliği durdurulduAşağıda örnek bir çalışma , aspUpload ve aspJpeg bileşenleri kullanılmıştır
<% strResimPathi = "C:\Inetpub\vhosts\siteadi.com\httpdocs\uploads\" strBolmeOrani = "20" ' %20 sini thumb edecek - 5 e bölecek Set Upload = Server.CreateObject("Persits.Upload") Set Jpeg = Server.CreateObject("Persits.Jpeg") Upload.SetMaxSize 5600000, True 'Maksimum dosya boyutu Upload.Save Set File = Upload.Files("THEFILE") If File Is Nothing Then strUrunResim = "Resimyok.gif" Else strDosyaAdi = File.Filename strDosyaUzantisi = Lcase(Right(File.Filename,4)) If strDosyaUzantisi = ".jpg" OR strDosyaUzantisi = ".png" OR strDosyaUzantisi = ".gif" Then 'Uzantılar kontrol ediliyor File.SaveAs strResimPathi & strDosyaAdi On Error Resume Next Jpeg.Open File.Path strScale = strBolmeOrani Jpeg.Width = Jpeg.OriginalWidth * strScale / 100 Jpeg.Height = Jpeg.OriginalHeight * strScale / 100 Jpeg.Save Server.MapPath("Uploads") & "\thumb_" & strDosyaAdi Else File.Delete End If End If %>