Yenya's World

Wed, 24 Feb 2010

Image Scaling

It is not very often when there is a software bug which is present in nearly all different implementations which do not even have common ancestor in terms of source code.

The image scaling bug is one of these exceptions. I wonder how many programs simply assume that the luminosity of the pixel created as a combination of the two pixels with luminosities of 0 and 255 (e.g. by downscaling the image) is somewhere around 128.

There are definitely several programs written by yours truly, which are built around this assumption. Altough I remember reading the NetPBM source code and seeing those odd calculations using a lookup table and wondering why they did not simply use the arithmetic mean.

I even think (but my memory is fading, so no strong statement here) that we used the arithmetic mean even in the computer graphics course during my studies.

Section: /computers (RSS feed) | Permanent link | 2 writebacks

2 replies for this story:

avakar wrote:

I'm not sure what luminosity means. There are several terms used to measure "brightness" (in the loose sense of the word), some of them refers to gamma-compressed values, some to linear ones and some are used ambiguously. Anyway, in computer graphics classes, brightness is usually represented as a (non-compressed) real number, so arithmetic mean is correct.

Danie wrote:

Thanks for sharing this post. This is a very helpful and informative material. Good post and keep it up. Websites are always helpful in one way or the other, that’s cool stuff, anyways, a good way to get started to renovate your dreams into the world of reality.I will write more in detail after my mcp very soon. Thanks!

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Thu, 11 Feb 2010

Web Comics Dying?

Is it just an unfortunate coincidence, or are several web comics sites slowly dying?

For example, Order of the Stick is updated only every two weeks or so, User Friendly runs repeated strips for about a year now, and even BOFH has not been updated since last December, and had only 17 stories last year.

Did the authors manage to get a real life finally? Or have they been swallowed by the Internet black hole which is Facebook?

Section: /world (RSS feed) | Permanent link | 2 writebacks

2 replies for this story:

avakar wrote:

You probably wouldn't be so sarcastic if you knew the story behind User Friendly: http://ars.userfriendly.org/cartoons/read.cgi?id=20091125&tid=3270602

Yenya wrote: Re: avakar

I have of course read that Illiad's post, but it still does not contain any hint about why the UF is more-or-less dead now. But then I am a UNIX admin, I am not really good at reading between the lines.

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Wed, 10 Feb 2010

Playing with 6to4

We have finally got some time to work on native IPv6 inside a faculty network (which includes rewriting the iptables configuration to be protocol-neutral). In order to test it, I have enabled 6to4 at home.

So now I have a native IPv6 in my home network, and I can even directly SSH to devices in my home network from the university network, even though the home network is hidden behind a single IPv4 address. Apparently my traffic is routed symmetrically, as both directions use the same 6to4 relay in ip-exchange.de in Nuernberg.

As for the network parameters, I have a direct ping 13.2 ms, while the ping6 is 27.1ms. The transfer rate, on the other hand, is purely limited by my ISP (measured by SCPing a large file), and it is the same for both protocols - slightly above 500 KB/s. Now if only I had a nearer 6to4 relay (maybe in NIX.CZ?).

The setup in Fedora is relatively straightforward, except when the outgoing interface has an IPv4 address assigned from DHCP. So I had to add the IPv6 configuration manually, and will have to change it whenever I get a new IPv4 address (which is usually once per year or two).

UPDATE 2010/02/10: Fedora problems fixed
My previous statement about problems in Fedora was not true. I must have made a mistake somewhere, but after recheking my setup and restarting the network the 6to4 tunnel works as expected.

Section: /computers (RSS feed) | Permanent link | 4 writebacks

4 replies for this story:

petr_p wrote:

I have used 6to4 for many years without any serious problem. I had to switch relay address to get better RTT few times (IP Exchange GmbH; Universität Leipzig; Kewlio.net Limited, UK). List of AS announcing anycast relay can be found on . However I'd really appreciate public relay in Czech Republic. (Why Cesnet does not have one, at least for members? NACEVI streams wouldn't flow abroad then.) BTW, are you going to resurrect ftp6.linux.cz? Which services is faculty going to offer on IPv6? (I remember almost a hundred of machines responded to ff02::1 echo request in faculty computer hall, but no global scope addresses was available.) Which DHCPv6 server are you going to install? Dibbler?

petr_p wrote: List of ASes

List can be found on [http://bgpmon.net/6to4.php]. (Yet another CMS discarding angle brackets.)

Yenya wrote: Re: petr_p

I should poke the CESNET people to create the 6to4 relay. Yes, I want to resurrect the ftp6.linux.cz service (or even add an AAAA record to the ftp.linux.cz name). For now, we want to create 3rd-layer infrastructure for IPv6, and then the services will follow. We have still not decided what DHCPv6 (or whether DHCPv6 at all instead of stateless config (aka radvd)).

petr_p wrote:

I prefer router advertisement too. However DHCP allows to deliver other important settings like default search domain name suffix, local time zone, outbound SIP proxy address etc. You can use DHCP in stateless mode too. Recursive DNS servers can be delivered through DHCP or radvd (but Linux support for RDNS option extraction from RA is poor).

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Sat, 06 Feb 2010

iPhone

Tell me again why should anybody bother to buy iPhone, when Apple is actively hostile to the application developers, and the device cannot do Bluetooth, does not have audio tracks in a portable format, accessible as a mass storage, and the manufacturer does not want you to customize the device?

Section: /computers (RSS feed) | Permanent link | 4 writebacks

4 replies for this story:

Milan Zamazal wrote:

It's all about marketing. A typical end user doesn't care about any advanced use, he just follows the crowd effect (why are exchangeable mobile phone covers so important?; or do you remember C mania at the times of our childhood?). One my friend mentioned that he had bought an iPod for his wife. I asked him why he had bought a device offering less features for higher price. He answered: "We walked around a music shop, I could see the iPod there, I liked it, so I've bought it. I'm not the kind of a person who performs market research when he needs such a simple thing like a music player." And then added: "BTW, I also like Macs. Their advantage is that *all* the applications work together out of the box, this is something I've never seen on Windows." (And I've never seen on GNU/Linux. Actually it doesn't seem to be that great on Macs as well, but it's probably indeed much better than on Windows. Got a clue why *restricting* available applications can work as an advantage?) Apple knows how to attract users and they (unlike most other manufactures) are not afraid of making products somewhat different from what others make, thus creating new (their own!) crowds. This is what matters on the market, not whether the products are really useful.

Yenya wrote: Re: Milan Zamazal

I can understand why the "non-thinking crowd" buys Apple products. But why would anybody buy them, and then try to develop software for them (and be pwned by the App store)?

Milan Zamazal wrote:

People can be easily exploited to make voluntary actions against their own profit. If you don't believe it, look at most election results. I don't know why people behave this way, perhaps you could find some answers in sociology literature.

Marcel Kolaja wrote:

Another story describing iPhone from a different point of view is the "hundreds of thousands of applications" myth. If you're interested in, you might want to take a look at this blog post: http://tomch.com/wp/?p=144

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

Fri, 05 Feb 2010

DHCP Relay

With our new WiFi access points, we run multiple SSIDs, each on its own VLAN. Unfortunately, we are observing an interesting problem: even though the DHCP server can see the WiFi client requesting the address and replies back, the reply sometimes does not reach the client. It vaguely depends on the number of clients on the particular WiFi AP. Today I think I have found what causes this problem.

In an unrelated event, our new 10GbE switches have arrived, and I have been configuring them. When browsing the manuals, I have noticed they have a feature called "DHCP relay", which causes DHCP requests to be magically switched to the primary VLAN of the switch, even when they are obtained from another VLAN. Well, one might think that almost nobody needs this obscure and unintuitive feature, so it is expected to be switched off by default.

Apparently the HP engineers do not share this point of view. Not only the DHCP relay is on by default on all newer ProCurve switches, but as a default setting, it is not mentioned in the "show config" command output, except when explicitly disabled. So nobody knows a new "feature" has been added, except when re-reading the manuals for every new ProCurve model.

I have found the DHCP relay feature being enabled even on other recently purchased switches. I have promptly disabled it, and we will see what happens with the above problem of missing DHCP replies.

Section: /computers (RSS feed) | Permanent link | 0 writebacks

0 replies for this story:

Reply to this story:

 
Name:
URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Comments:
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)

About:

Yenya's World: Linux and beyond - Yenya's blog.

Links:

RSS feed

Jan "Yenya" Kasprzak

The main page of this blog

Categories:

Archive:

Blog roll:

alphabetically :-)