note 60805 added to function.imageinterlace
| From: | mangobrain dot co dot uk at osu1 dot php dot net | Date: | Tue, 17 Jan 2006 10:03:05 +0000 |
| Subject: | note 60805 added to function.imageinterlace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-101959@lists.php.net to get a copy of this message | ||
dr_snapid's comment that "the server sends every Nth line" is not entirely true. A
web server need not know anything about the contents of the file it is sending; its job is simply to
send the data. Rather, the image is created in such a way that the data corresponding to "every
Nth line" appears at the beginning of the file, with the details becoming able to be filled in
as more of the file is received by the browser. In PHP's case, the data may have been generated
dynamically instead of pulled from a file, but this does not change the fact that it is the data
itself that is different, not the manner in which it is sent.*
In fact, with JPEG, it is less "every Nth line", and more "every Nth pixel",
where N is gradually decreased, resulting in a grid that gets progressively more fine-grained as the
data is received (hence the appearance of a low res image becoming more detailed). The browser
basically estimates what goes in the gaps between pixels, probably by simply blending between the
colours, whilst the "real" data continues arriving. This is a fundamentally different
method for encoding the data when compared to non-progressive JPEGs, and coupled with the
format's other compression techniques, may indeed result in a different file size.
*Can you imagine how much more buggy the Web would be if servers were expected to send different
file types using different algorithms, and browsers were expected to be able to receive every one of
them?
----
Server IP: 140.211.166.146Probable Submitter: 62.3.195.38
----
Manual Page -- http://www.php.net/manual/en/function.imageinterlace.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60805
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60805&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60805&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60805&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60805&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60805&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60805&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60805&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60805&report=yes
Search -- http://master.php.net/manage/user-notes.php