2023年6月6日 星期二

Wiki 高大成 的摘錄

 揶揄網友


2014年 4 月 13日一名網友留言,「高先生你是否應該去身心科諮詢一下,雖然你是大醫生,但總有疏忽的時候~祝福你早日康復」,高大成親自回覆「我很好!多謝您的指教。將來出示此貼文及您本人身份證明:

  1. 行政相驗多送您兩張死亡相驗証明書。
  2. 司法所需之司法鑑定可以九折優惠。(僅限您本人)」[18]

真的太好笑了。

建議大家 花時間 看看wiki 全文,了解他對於台灣的貢獻。


2023年5月1日 星期一

check windows system health

check windows system health 
  • DISM /online /cleanup-image /checkhelath 
  • DISM /online /cleanup-image /scanhelath 
  • DISM /online /cleanup-image /restorehelath

2023年4月23日 星期日

Batch-Image-Converter

batch_img_convert

batch_img_convert

This is a Windows x64 program written in Delphi 11.4 that can batch convert image files of different formats such as BMP, JPG, PNG, GIF, TIFF.

Features

  • You can select single files or folders to convert
  • You can recursively convert all image files in the folder
  • You can choose the output image format and quality
  • You can choose whether to overwrite the original file or save as a new file
  • You can view the progress and result of the conversion

How to use

  1. Download and unzip all files in the Win64/Release folder
  2. Run the batch_img_convert.exe program
  3. Click the "Add Files" button and select the image files or folders you want to convert
  4. Click the "Convert" button and select the output image format and quality
  5. Click the "Start" button to start converting image files
  6. Wait for the conversion to complete and check the conversion result

2023年4月12日 星期三

XYZ 轉色溫的方式

function XYZToColorTemperature(X, Y, Z: Double): Double;
var
  n, u, v, duv: Double;
begin
  // Normalize XYZ values
  n := X + Y + Z;
  if (n = 0) then
    Exit(0);
  X := X / n;
  Y := Y / n;
  Z := Z / n;

  // Calculate u and v values
  u := (4 * X) / (-2 * X + 12 * Y + 3);
  v := (9 * Y) / (-2 * X + 12 * Y + 3);

  // Calculate duv (distance from Planckian locus)
  duv := 0;
  if (u - 0.20917 * v) > 0.46228 then
    duv := (u - 0.20917 * v - 0.46228) / 0.02
  else if ((0.08067 * v - u) > 0.17697) then
    duv := (0.08067 * v - u - 0.17697) / 0.02;

  // Calculate color temperature
  Result := (1.0 / ((-4.607 * duv + 2.9672) * 1e-3) + 1.0 / 500) * 1e3;
end;

2023年4月11日 星期二

RGB to XYZ code example by delphi

procedure XYZToLab(X, Y, Z: Double; out L, a, b: Double);

const

  Xn = 95.047;

  Yn = 100.000;

  Zn = 108.883;

var

  fx, fy, fz: Double;

begin

  // calculate the relative luminance

  fy := Power(Y/Yn, 1/3);

  if Y/Yn <= 0.008856 then

    fy := 7.787 * Y/Yn + 16/116;


  // calculate a and b

  fx := Power(X/Xn, 1/3);

  if X/Xn <= 0.008856 then

    fx := 7.787 * X/Xn + 16/116;


  fz := Power(Z/Zn, 1/3);

  if Z/Zn <= 0.008856 then

    fz := 7.787 * Z/Zn + 16/116;


  L := 116 * fy - 16;

  a := 500 * (fx - fy);

  b := 200 * (fy - fz);

end;





 var

  X, Y, Z, L, a, b: Double;

begin

  // set the XYZ color values

  X := 45.242;

  Y := 52.876;

  Z := 73.215;


  // convert the XYZ color to CIELAB

  XYZToLab(X, Y, Z, L, a, b);


  // output the CIELAB color values

  ShowMessage(Format('L* = %f, a* = %f, b* = %f', [L, a, b]));

end;