پرونده:Antialiased lanczos.png

Page contents not supported in other languages.
از ویکی‌پدیا، دانشنامهٔ آزاد

Antialiased_lanczos.png(۱۲۸ × ۱۲۸ پیکسل، اندازهٔ پرونده: ۹ کیلوبایت، نوع MIME پرونده: image/png)

خلاصه

توضیح
English: Antialiased chessboard using the Lanczos algorithm, made by myself based on the source in File:Antialiased.png's description. This one should be relatively close to an ideal filter, primarily because I used a lot of taps (several million) for the more problematic pixels.
تاریخ ‏۲۳ دسامبر ۲۰۰۸‏ (تاریخ اصلی بارگذاری)
منبع Transferred from en.wikipedia to Commons.
پدیدآور Sesse در ویکی‌پدیا انگلیسی

اجازه‌نامه

Public domain این اثر توسط پدیدآور آن، Sesse در ویکی‌پدیا انگلیسی، به مالکیت عمومی درآمده است. این مربوط به تمام جهان است.
در برخی از کشورها ممکن است به صورت قانونی این امکان‌پذیر نباشد؛ اگر چنین است:
Sesse به هر کسی اجازهٔ استفاده از این اثر برای هر مقصودی، بدون هیچ‌گونه شرایطی، را می‌دهد تا وقتی که این شرایط توسط قانون مستلزم نشده باشند.

Source

Here's the source I used, written by myself. The choice of 16384x16384 might have been overkill; I cannot spot any significant differences between this and using 1024x1024 taps all over the image. The generation took about an hour on one core of an Intel Q9450.

Compile and link with

gcc -O3 -o antialias antialias.c -lm -std=gnu99
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>

 /*
  * Do a finer sampling the higher up we get in the picture,
  * since there's much more detail there.
  */
 #define SAMPLES_FROM_Y(y) ((16384 * 512) / (y*y + 512))
 #define MAX_SAMPLES SAMPLES_FROM_Y(0)

 float weights[MAX_SAMPLES][MAX_SAMPLES];

 static inline int color(double x, double y)
 {
         double t, z;
         int i, j, k;

         x = x * (1.0 / 128.0) - 0.5;
         y = y * (1.0 / 2048.0);

         t = 1.0 / (y + 0.001);
         z = t * x;
         i = floor(t);
         j = floor(z);
         k = i + j;
         return ((k % 2) != 0);
 }

 static double sinc(double x)
 {
         static const double cutoff = 1.220703668e-4;  /* sqrt(sqrt(eps)) */

         if (abs(x) < cutoff) {
                 /* For small |x|, use Taylor series instead */
                 const double x2 = x * x;
                 const double x4 = x2 * x2;

                 return 1.0 - x2 / 6.0 + x4 / 120.0;
         } else {
                 return sin(x) / x;
         }
 }

 static double lanczos_tap(double x)
 {
         if (x < -3.0 || x > 3.0)
                 return 0.0;
         if (x < 0.0)
                 return sinc(-x*M_PI) * sinc(-x*M_PI / 3.0);
         else
                 return sinc(x*M_PI) * sinc(x*M_PI / 3.0);
 }

 static void precalculate_weights(unsigned num_samples)
 {
         double total = 0.0;
         for (int yi = 0; yi < num_samples; ++yi) {
                 double sy = 6.0 * ((double)yi / num_samples - 0.5);
                 double wy = lanczos_tap(sy);
                 for (int xi = 0; xi < num_samples; ++xi) {
                         double sx = 6.0 * ((double)xi / num_samples - 0.5);
                         weights[yi][xi] = wy * lanczos_tap(sx);
                         total += weights[yi][xi];
                 }
         }

         double inv_total = 1.0 / total;
         for (int yi = 0; yi < num_samples; ++yi) {
                 for (int xi = 0; xi < num_samples; ++xi) {
                         weights[yi][xi] *= inv_total;
                 }
         }
 }

 static double antialiased_color(double x, double y, unsigned num_samples)
 {
         double acc = 0.0;
         double delta = 6.0 / num_samples;
         int xi, yi;
         double sx, sy;

         for (yi = 0, sy = y - 3.0; yi < num_samples; ++yi, sy += delta) {
                 for (xi = 0, sx = x - 3.0; xi < num_samples; ++xi, sx += delta) {
                         if (color(sx, sy)) {
                                 acc += weights[yi][xi];
                         }
                 }
         }
         return acc;
 }

سیاهه بارگذاری اصلی

صفحهٔ اصلی توضیحات اینجابود. همهٔ نام‌های کاربر زیر به en.wikipedia اشاره دارند.
تاریخ/زمان ابعاد کاربر توضیح
2011-03-19 16:41 128×128× (11220 bytes) Dicklyon compromise, since for many displays it goes too far to do full sRGB gamma hack
2010-09-23 03:06 128×128× (14944 bytes) Ancient Anomaly Aactually it was still too dark. This one should be correct.
2010-09-23 03:03 128×128× (11220 bytes) Ancient Anomaly Reverted to version as of 09:07, 23 December 2009 #808080 is NOT halfway between black and white, sRGB is not linear
2010-07-20 12:48 128×128× (10284 bytes) Technion Reverted to version as of 14:27, 23 December 2008: Revert to original image by Sesse. In original image, gray at top of image is #808080, halfway between black and white as would be expected; in Dicklyon’s modified version, gray at top is much lighter t
2009-12-23 09:07 128×128× (11220 bytes) Dicklyon Adjust tone scale, since no gamma correction was applied when the image was created.\
2008-12-23 14:27 128×128× (10284 bytes) Sesse Antialiased chessboard using the Lanczos algorithm, made by myself based on the source in [[File:Antialiased.png]]'s description. This one should be relatively close to an ideal filter, primarily because I used a lot of taps (several million) for the more

عنوان

شرحی یک‌خطی از محتوای این فایل اضافه کنید

آیتم‌هایی که در این پرونده نمایش داده شده‌اند

توصیف‌ها

checksum انگلیسی

a6bba7e45908e78e31ae17e50a83f1b586d736e8

۸٬۸۲۹ بایت

۱۲۸ پیکسل

۱۲۸ پیکسل

تاریخچهٔ پرونده

روی تاریخ/زمان‌ها کلیک کنید تا نسخهٔ مربوط به آن هنگام را ببینید.

تاریخ/زمانبندانگشتیابعادکاربرتوضیح
کنونی‏۱۷ مهٔ ۲۰۲۳، ساعت ۰۹:۵۱تصویر بندانگشتی از نسخهٔ مورخ ‏۱۷ مهٔ ۲۰۲۳، ساعت ۰۹:۵۱۱۲۸ در ۱۲۸ (۹ کیلوبایت)PhreneticcReduced file weight with FileOptimizer in lossless compression mode.
‏۱۹ مارس ۲۰۱۱، ساعت ۱۰:۲۳تصویر بندانگشتی از نسخهٔ مورخ ‏۱۹ مارس ۲۰۱۱، ساعت ۱۰:۲۳۱۲۸ در ۱۲۸ (۱۵ کیلوبایت)File Upload Bot (Magnus Manske) {{BotMoveToCommons|en.wikipedia|year={{subst:CURRENTYEAR}}|month={{subst:CURRENTMONTHNAME}}|day={{subst:CURRENTDAY}}}} {{Information |Description={{en|Antialiased chessboard using the Lanczos algorithm, made by myself based on the source in File:Antialia

صفحهٔ زیر از این تصویر استفاده می‌کند:

کاربرد سراسری پرونده

ویکی‌های دیگر زیر از این پرونده استفاده می‌کنند: