Gmail Calendar Documents Web Reader more »
Recently Visited Groups | Help | Sign in
Google Groups Home
narzędzie do width i height
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
takeshin  
View profile   Translate to Translated (View Original)
 More options Jan 31 2006, 3:57 pm
Newsgroups: pl.comp.www
From: "takeshin" <m...@me.here>
Date: Tue, 31 Jan 2006 21:57:10 +0100
Local: Tues, Jan 31 2006 3:57 pm
Subject: narzędzie do width i height
witam!

często pisząc stronę w notatniku,
wstawiam linki w postaci:
<img src="plik.jpg" alt="obrazek">

czy jest jakieś narzędzie, które po przepuszczeniu pliku html,
odczytało by rozmiary zlinkowanych plików
i zwróciło linki w postaci:
<img src="obrazek.jpg" alt="obrazek" width="obrazek_szerokosc"
height="obrazek_wysokosc">

wiem, że te atrybuty nie są wymagane,
ale jeżeli są podane,
layout się szybko ładuje,
zanim się pojawią obrazki

pozdrawiam!


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gregbike  
View profile   Translate to Translated (View Original)
 More options Jan 31 2006, 4:49 pm
Newsgroups: pl.comp.www
From: "Gregbike" <gregbike_usun...@poczta.onet.pl>
Date: Tue, 31 Jan 2006 22:49:56 +0100
Local: Tues, Jan 31 2006 4:49 pm
Subject: Re: narzędzie do width i height

> często pisząc stronę w notatniku,
> wstawiam linki w postaci:
> <img src="plik.jpg" alt="obrazek">

> czy jest jakieś narzędzie, które po przepuszczeniu pliku html,
> odczytało by rozmiary zlinkowanych plików
> i zwróciło linki w postaci:
> <img src="obrazek.jpg" alt="obrazek" width="obrazek_szerokosc"
> height="obrazek_wysokosc">

> wiem, że te atrybuty nie są wymagane,
> ale jeżeli są podane,
> layout się szybko ładuje,
> zanim się pojawią obrazki

Zaprzęgnij do pracy PHP i Mod rewrite.

Greg


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
porneL  
View profile   Translate to Translated (View Original)
 More options Jan 31 2006, 4:57 pm
Newsgroups: pl.comp.www
From: porneL <por...@despammed.com>
Date: Tue, 31 Jan 2006 21:57:45 -0000
Local: Tues, Jan 31 2006 4:57 pm
Subject: Re: narzędzie do width i height
On Tue, 31 Jan 2006 21:49:56 -0000, Gregbike  

<gregbike_usun...@poczta.onet.pl> wrote:
>> czy jest jakie? narz?dzie, które po przepuszczeniu pliku html,
>> odczyta?o by rozmiary zlinkowanych plików
>> i zwróci?o linki w postaci:
>> <img src="obrazek.jpg" alt="obrazek" width="obrazek_szerokosc"
>> height="obrazek_wysokosc">

>> wiem, ?e te atrybuty nie s? wymagane,
>> ale je?eli s? podane,
>> layout si? szybko ?aduje,
>> zanim si? pojawi? obrazki

> Zaprz?gnij do pracy PHP i Mod rewrite.

Czemu akurat mod_rewrite? Nie php.net/DOM przypadkiem?

Może wystarczy wymienić prymitywnego notatnika na edytor programistyczny?  
Mi np. TextMate generuje cały tag <img> wraz z wymiarami jak tylko  
przeciągnę obrazek do okna z kodem HTML.

--
* html {redirect-to: url(http://browsehappy.pl);}
this.author = new Geek("porneL");

http://pornel.net/krzaki-w-poscie?


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ethanak  
View profile   Translate to Translated (View Original)
(1 user)  More options Jan 31 2006, 5:13 pm
Newsgroups: pl.comp.www
From: ethanak <etha...@p01ip.c0m>
Date: Tue, 31 Jan 2006 23:13:45 +0100
Local: Tues, Jan 31 2006 5:13 pm
Subject: Re: narzędzie do width i height
On 2006-01-31 22:49, Gregbike wrote:
[...]

> Zaprzęgnij do pracy PHP i Mod rewrite.

Tak z ciekawości - jakie tu widzisz zastosowanie dla mod_rewrite?

plik.shtml:

<img src="jakis.gif"
<!--#exec cmd="/usr/bin/X11/identify -ping -format
'style=\"width:%wpx;height:%hpx\"' jakis.gif"-->>

ethanak


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "narzędzie do width i height" by Marcin Sztolcman
Marcin Sztolcman  
View profile   Translate to Translated (View Original)
(1 user)  More options Jan 31 2006, 5:47 pm
Newsgroups: pl.comp.www
From: Marcin Sztolcman <em...@failed.example.com>
Date: Tue, 31 Jan 2006 23:47:36 +0100
Local: Tues, Jan 31 2006 5:47 pm
Subject: Re: narzędzie do width i height
Dnia 31-01-2006, wto o godzinie 21:57 +0100, takeshin napisał(a):

> <img src="obrazek.jpg" alt="obrazek" width="obrazek_szerokosc"
> height="obrazek_wysokosc">

tak na 3 minuty zabawy:

#v+
#!/usr/bin/env python
# -*- coding: iso-8859-2 -*-
import os.path
import re
import Image
import sys

if len(sys.argv) == 1:
  print 'Podaj nazwy plików'

def replace(html):
  rx = r'''(?im)(<\s*img\s*src=(["'])(?P<img>.*?)\2.*?/>)'''
  imgs = re.findall(rx, html) #, re.I|re.M)
  if imgs:
    for imgtag, tmp, fname in imgs:
      if imgtag.find('width=') == -1 and\
          imgtag.find('height=') == -1 and\
          os.path.isfile(fname):
        intag = 'width="%dpx" height="%dpx"' % Image.open(fname).size
        ntag = imgtag[:-2] + intag + ' />'
        html = html.replace(imgtag, ntag)
  return html

files = sys.argv[1:]
for f in files:
  if not os.path.isfile(f):
    print 'Nie znaleziono:', f
    continue
  html = replace(open(f).read())
  open(f, 'w').write(html)
#v-

wymagany interpreter pythona i modul PIL.
oczywiście niedopracowane, ale chwila zabawy więcej i można dorobić
wszystko co jeszcze optrzebne (ale to już zostawiam Tobie ;) )

        MySZ

--
Marcin ``MySZ`` Sztolcman
http://diary.urzenia.net :: mailto:http://urzenia.net/email
System zarządzania treścią :: http://core-cms.com


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "narzedzie do width i height" by takeshin
takeshin  
View profile   Translate to Translated (View Original)
 More options Feb 1 2006, 2:18 am
Newsgroups: pl.comp.www
From: "takeshin" <peszorWYT...@op.pl>
Date: Wed, 1 Feb 2006 08:18:48 +0100
Local: Wed, Feb 1 2006 2:18 am
Subject: Re: narzedzie do width i height

>wymagany interpreter pythona i modul PIL.
>oczywiście niedopracowane, ale chwila zabawy więcej i można dorobić
>wszystko co jeszcze optrzebne (ale to już zostawiam Tobie ;) )

dzięki
pythona nie używam,
ale rzecz jest do zrobienia w php

ale o taki mniej więcej skrypt mi chodziło ;)


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "narzędzie do width i height" by takeshin
takeshin  
View profile   Translate to Translated (View Original)
 More options Feb 1 2006, 3:39 am
Newsgroups: pl.comp.www
From: "takeshin" <peszorWYT...@op.pl>
Date: Wed, 1 Feb 2006 09:39:07 +0100
Local: Wed, Feb 1 2006 3:39 am
Subject: Re: narzędzie do width i height

> Może wystarczy wymienić prymitywnego notatnika na edytor programistyczny?
> Mi np. TextMate generuje cały tag <img> wraz z wymiarami jak tylko
> przeciągnę obrazek do okna z kodem HTML.

ooo
dzięki :)
to się nazywa dobra rada ;)
nie wpadłem na drag'n'drop...
w moim pspad'zie też ładnie działa

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google