İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

Persits.Jpeg ile nerde hata yapıyorum ?

OrhanGuzel

0
İyinet Üyesi
Katılım
9 Ocak 2008
Mesajlar
78
Reaction score
0
Merhaba öncelikle sunucumda Persits.Jpeg kurulu ama bir türlü resimler görünmüyor kodlar aşağıda nerde hata yapmışım anlamadım ?



a.asp

Kod:
<!--#include file="base.asp"-->

<%

 Response.Expires = 0

 

 Set Jpeg = Server.CreateObject("Persits.Jpeg")

 

 Jpeg.Open( decode(Request("path")) )

 width=Request.QueryString("Width")

 height=Request.QueryString("height")

 

 if jpeg.Width > cint(width) then 

 jpeg.width=width

 Jpeg.Height=Jpeg.OriginalHeight * Jpeg.Width / Jpeg.OriginalWidth 

 end if

 

 if jpeg.Height > cint(height) then 

 jpeg.height=height

 Jpeg.width=Jpeg.OriginalWidth * Jpeg.Height / Jpeg.OriginalHeight 

 end if

 'end if

 Jpeg.SendBinary

%>



b.asp

Kod:
 <% ui=0

              while not iurn.eof

              set ursm= bag.execute("select top 1 *from resim where uid="& iurn("id") &" order by def,id desc")

              if not ursm.eof then

               resim=ursm("resim")

              else

               resim="images/space.gif"

              end if

              if ui mod 3=0 and ui<>0 then response.Write("</tr><tr><td height=5></td></tr><tr>")%>

 

<td align="center"><a href="urun.asp?id=<%=iurn("id")%>"><img src="a.asp?path=<%= encode(server.MapPath(resim)) %>&width=149&height=100" border="0" /></a></td>



base.asp



Kod:
<%' Functions to provide encoding/decoding of strings with Base64.

' 

' Encoding: myEncodedString = base64_encode( inputString )

' Decoding: myDecodedString = base64_decode( encodedInputString )

'

' Programmed by Markus Hartsmar for ShameDesigns in 2002. 

' Email me at: [email protected]

' Visit our website at: :: shame.designs ::

'

 Dim Base64Chars

 Base64Chars = "LMNOWXFGRPASYJDETUKQCBHIVZ" & _

   "hfgptuvwjknsxyzbilomqraecd" & _

   "0123456789" & _

   "+/"

 

 ' Functions for encoding string to Base64

 Public Function encode( byVal strIn )

  Dim c1, c2, c3, w1, w2, w3, w4, n, strOut

  For n = 1 To Len( strIn ) Step 3

   c1 = Asc( Mid( strIn, n, 1 ) )

   c2 = Asc( Mid( strIn, n + 1, 1 ) + Chr(0) )

   c3 = Asc( Mid( strIn, n + 2, 1 ) + Chr(0) )

   w1 = Int( c1 / 4 ) : w2 = ( c1 And 3 ) * 16 + Int( c2 / 16 )

   If Len( strIn ) >= n + 1 Then 

    w3 = ( c2 And 15 ) * 4 + Int( c3 / 64 ) 

   Else 

    w3 = -1

   End If

   If Len( strIn ) >= n + 2 Then 

    w4 = c3 And 63 

   Else 

    w4 = -1

   End If

   strOut = strOut + mimeencode( w1 ) + mimeencode( w2 ) + _

       mimeencode( w3 ) + mimeencode( w4 )

  Next

  encode = strOut

 End Function

 Private Function mimeencode( byVal intIn )

  If intIn >= 0 Then 

   mimeencode = Mid( Base64Chars, intIn + 1, 1 ) 

  Else 

   mimeencode = ""

  End If

 End Function 

 

 ' Function to decode string from Base64

 Public Function decode( byVal strIn )

  Dim w1, w2, w3, w4, n, strOut

  For n = 1 To Len( strIn ) Step 4

   w1 = mimedecode( Mid( strIn, n, 1 ) )

   w2 = mimedecode( Mid( strIn, n + 1, 1 ) )

   w3 = mimedecode( Mid( strIn, n + 2, 1 ) )

   w4 = mimedecode( Mid( strIn, n + 3, 1 ) )

   If w2 >= 0 Then _

    strOut = strOut + _

     Chr( ( ( w1 * 4 + Int( w2 / 16 ) ) And 255 ) )

   If w3 >= 0 Then _

    strOut = strOut + _

     Chr( ( ( w2 * 16 + Int( w3 / 4 ) ) And 255 ) )

   If w4 >= 0 Then _

    strOut = strOut + _

     Chr( ( ( w3 * 64 + w4 ) And 255 ) )

  Next

  decode = strOut

 End Function

 Private Function mimedecode( byVal strIn )

  If Len( strIn ) = 0 Then 

   mimedecode = -1 : Exit Function

  Else

   mimedecode = InStr( Base64Chars, strIn ) - 1

  End If

 End Function

%>



Resimler bir türlü görünmüyor
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Üst