Category Archives: raph’s

My some GitHub sources updated for Linux.

It was long time to boot my Linux laptop for a while. And updated almost of my GitHub source codes to work on Linux, too. Actually I just cared about Windows and Mac OS-X, except my old friend Linux.

But now, almost of source codes may works on Makefile.{platform} name, then it will be need copy Makefile.{platform} to Makefile.

Ok, It’s time to step for next, some GUI programs to make it works almost of platforms like Linux and MacOS-X.

Don’t be a victim of AliExpress faud coin sales.

It is my terrible experience happended in a hour ago, I found a 3.5″ Orico HDD enclosure with 1099 Ali coins with 17.99 USD. I have understand it must be a chance to buy it lowest cost because huge amount coins required to buy this.

Had paid over 19 USD with faster shipping method with 1099 coins ! It was a long time to gather 1099 coins, everyday I need attend get 16 coins, easily I could calculated 1099 / 16 = 68.6 days ! 1/5 of a year.

And terrible experience soon happeneded because I found lower cost with same seller !

 What? 16.91 USD ?

So I have check again my previous item what I have ordered.

 What the f**k ?

Yes, I was a victim. AliExpress need many people be victims to wasting their Ali coins with more expensive price of some fraud sales, by fake it looks more cheaper than others.

Don’t be a victim.

AliExpress doing faud sales with Ali-Coins.

Chinese finally doing bad sales with fake issues. Really bad people.
Please share this article as you can if you are also a victim as like me.

Bad asses, Stop doing that !

And I tried to refund my wasted Ali coins, but they just left me this words:

Yes, you are just corry, that’s all. So thank you so much so f**king preciate !

Two different version of Lexar SDXC 64GB UHS-1 (300x)

I found something interested issue, it is about two different version of Lexar SDXC 64GB 300x where it made from. My cards are two different nations : Taiwan and Korea. And I could suppose one of those must be belong to Barun Electronics of South Korea.

So I had check what different is benchmark, first is from Taiwan.

Reading speed in sequence, about 45~46MB/sec in USB 3.0 (UHS-1) card reader. And Writing speed recorded as 24~26MB/sec. Important in using Android device may 4K writing speed, and it recorded around 1MB/sec.

And next is from Korea.

Reading is definitely better than Taiwan, but real performance is not belong to speed of reading. Check writing speed, and really important is maybe 4K, as see, it recorded under 1MB/sec, really poor.

If you can choose what it from, I strongly recommends choose Taiwan. Don’t waste your valuable memories by accident at once by happening sudden death of sdcard of Barun Electronics. It really sucks, I had wasted totally 3 64GB cards even it printed MLC on surface.

tinydicom + rawprocessor lesson #2

Now it’s time to next step for using my open sources,  And here I like to introduce how loads DCM and what it contains inside tags.

Just read my example code to read DICOM tags from DCM file, it should help what inside.

It may compiles with libtinydicom.a linkage as well, just compile your code with -ltinydicom -L{libtinydicom.a directory from your path}. Or, just follow my way – Make an empty directory in your working directory –  I like to recommend to make a directory as like ‘projects’. Then make a new again for unique name to check for next time, or continue to more works : recommend ‘dcmtest1’ or ‘dcmtest2’. So you may now placed to {Your home directory}/projects/dcmtest1 when you had followed my recommendation. Now make a empty cpp file with any editor like vim, then copy & paste my example, then save it up and quit editor. Then copy prebuilt “libtinydicom.a” and “libdcm.h” into your current directory – if you didn’t prebuilt? just build it first. and type like this.

g++ main.cpp -ltinydicom -o test1

You may check test1 or test1.exe (on Windows).
Now you need download sample DCM file from here:


If you have wget, you can do :


Now you have SIMFIT.dcm and compiled binary with same directory. Just type your binary name. And check result. 87 items may displayed with sizes.


Then, try to next step, save raw pixel image to a new file. See my example source.

Now you need prebuilt librawprocessor.a and rawprocessor.h file in your directory with example source code. It proceeds read SIMFIT.DCM and export pixel image information, then writes to a file.

Important points is ‘Checking Window center and width’ from DICOM tag ID 0028:1050 and 0028:1051. These tags contains information of window center and width, and it must applied to exported image. So I used Get16bitThresholdedImage() method to make windowed image.

If you need more detailed? just let left a guestbook here.

Next lesson may using libPNG, and make raw image to 8bit grey scaled image to see in common image viewing programs.

HTTP not secured, thanks browsers.

Yes, many browsers now planned to display “NOT SECURED” on URL input, yes we know HTTP is legacy, but for any input method meaning not secured? Nonsens!

Making SSL encryption may increases security for personal information, yes may many people knows, but I want to claim why it enforce all web sites need use SSL even they only have “Search input” ?

How about case like mine, just using really small private server only works on Palapa server (Android and lighttpd with PHP and mySQL). Need SSL ? For whom?

Thank you for good sales to SSL. Be a rich ! Hale to them !


Super★Talent Express NST1 128GB review

 Super★Talent is a brand name sales USB mass storages and memory products in USA. NST1 128GB is one of their USB drive in middle price.

NST1 used Single channel TLC NAND flash with SMI controller, writes up to 90MB/sec, reading up to 120MB/sec in sequence.

Accessing random placed data – related in 4K – speed is better than MLC series of NST1 64GB. Light weight and easy to use, little tightly pull up and down case is may better than loose and easily lost case or cover.

tinydicom + rawprocessor lesson #1

Here I planned to write some lessons to understand what is libtinydicom (Tiny DICOM library) and librawprocessor (RAW Processing library) for most of modern compilers except M$VC – unfortunately I am sorry about supporting M$VC, but I don’t like care about distinct, banishing standard compiler.

Ok, let understand what is each library doing what it does and what it existed for.


This library was born to read and write DICOM tags in a file by myself. At a time I made this, there’s some commercial libraries and open source too – A.K.A DCMTK. I was just wanted to write simply some DICOM tags and also reads Pixel datas from any DCM files – so I have started to read NEMA’s DICOM standards. And it was about 2011.

It passed years and continuously made it works well with many different DCM files, and now it availed to as an open source on

Anyone can clone or download source code and use it for freely with small license MIT. Just Ok for announcing what you used it your project or product.

Supported compilers are most of modern C++ compiler supporting Makefile. It made with MinGW-W64 and Code::Blocks IDE, but now supporting Mac OS-X and Linux too because it made only with C++ STL.

How to use it ?

Simply you can download source code as ZIP compression from here. And you may need already know how I can extract ZIP file to somewhere, and plus more you must know what I have to use compiler with this library – If don’t know? Just, please, don’t try to use it, It may difficult to understand next jobs.

Now choose one of Makefiles that have extensions – gcc and llvm.  Just copy one Makefile.{your compiler to use} to Makefile as like cp Makefile.gcc Makefile and then, just type to make.   If it succeed to build all sources, you can see a lib directroy, and there’s two files : libtinydicom.a and libdcm.h

And now you may understand how it be used, and this lesson may continued to next.



librawprocessor born to doing something for most of medical RAW images. It supports read and write, rotating, flip, convert to 8 bit image and more features.

You can download or clone source codes here.

“librawprocessor” supports OpenMP for processing image quickly if your compiler supports this feature. Most of processing features are optized for OpenMP and AVX instruction.


  • Load from File, Memory.
  • Save as a new RAW image.
  • Flip vertical, horizontal
  • Fast Rotate 90, 180, 270 degrees
  • Free Rotate in 0 to 359.99 degrees
  • Change width and height in size of height, to recognize what resolution is right.
    ( Most medical RAW images has no information about sizes )
  • Invert
  • Rescale with many filters : Bilinear, Bicubic, B-Spline, Lanzcos
  • Kernel matrix filtering : sharpen, blur or customized
  • Brightness, Contrast, Gamma adjustment
  • Tone mapping with Drago and Reinhard
  • Generate low frequency image and anisotropic filtered image from source
  • Advanced edge enhace
  • Automatic weight calculation ( window width )
  • Get down scaled pixel ranged data from source ( thresholding to any bits, 8 or 16bits )

How to use it ?

Simply you can download or clone from here. You may need prepared to understand what is your compiler and how to build with Makefile. ( M$VC not an option, sorry about this but no plan to future, too ) Tested almost of GCC environments : Windows, Mac OS-X, Linux.

After you got source code on your system, copy your right Makefile.{compiler type you have} to Makefile as like this : cp Makefile.gcc Makefile , then proceed simply make. And you can decide to use OpenMP option with appends a word openmp to make.

Required OpenMP is at least 3.0 or above. lower version may reason of compile failure.

And now you may understand how it be used, and this lesson may continued to next, too.

An open source graphical help tool library, fl_imgtk.

Here is an open source library helps many Fl_RGB_Image processing to make some featured GUI.  You can clone or download source code in free on GitHub page.

It designed to work with any type of gcc ( llvm-gcc and MinGW-W64 ) with just a copy and type ‘make’, or modify Makefile.{your compiler} and copy to it as Makefile, then it could be compiled and writes libfl_imgtk.a into “lib” directory includes fl_imgtk.h.

What you can do ?

It provides some features to processing Fl_RGB_Image as like Photoshop.

  • Flip image in vertical or horizental.
  • Rotate image in any degree with smoothen pixels.
  • Adjusting contrast, bright and gamma.
  • Drawing image to blurred ( by using fl_smimg rescaling ).
  • Rescale with muliple filters ( nearest, bilinear, bicubic, lanczos, b-spline )
  • Tone mapping ( HDRi ) with two different algorithms : Drago and Reinhard ( refered to FreeImage3 )
  • Kernel matrix filtering ( basically supports blur, blur more, sharpen, sharpen more filters)
    Specially any user can make a new kernel filter easily.
  • Draw Fl_Widget to Fl_RGB_Image
  • Draw Fl_Widget to blurred Fl_RGB_Image as it could be used in cool background.
  • Cropping image to a part of new image.


Before you start with this open source library, prepare what FLTK library compiled or installed in your system. I amd working my clone version of FLTK 1.3.4-1.

First you need to do, download or cloen with your git into your working directoy. Then, copy Makefile.{your compiler} to Makefle. ( ex, cp Makefile.gcc Makefile )

Now just proceeding make.

If you faced to unknown reference of FLTK libraries, you may need edit Makefile.

You can changes FLTK_xxx configuration to your right place. It will works well any platform that availed to compile FLTK library.

Any question ?

You can make a new issue on my GitHub page, or my Guest book on my blog.



  • MIT License


External Licenses

  • FLTK license
  • FreeImage (3) license.

Fixing SD card unexpected unmounting problem of Oukitel U20 plus SIM tray.

Oukitel U20 plus was a good budget smartphone has FHD resolution and dual cameras priced under 100 USD in the world from China.

But some people may have experience about “Unexpected SD card unmounted” problem in real life. All apps turned to gray and it doesn’t run while SD card mounted again by hitting back side of SIM tray again.

So I have to fix this prblem, and tear off back cover with some stripping tools.

Now I understand why U20 plus so heavy, and astonished Oukitel grown up well to architecting better than before about times of K6000. Some lacks by mistery of price under 100 USD, may acceptable – inside back cover color was white, I was expected black or dark inside.

Examined why SD card going unmounted in unexpected times, and found reason of this.

It was seems to reason of cost reduction, low cost componet problem of SIM tray + SD card. There’s nothing like shielding metal covers on component, just rare plastic itself made weakage on bending inside by pressure. Here I explained why it going worst:

To prevent unexpected unmounting SD card by any shock, I need put shomething to make depth to same beside EMI shielded block of right side. I put couple of transparency urethane film, and it made depth more thicker. And it made for better than befoe, test many shock by hitting area of SIM tray and it not happened to unmounting SD card again.

It may better put something to make fill gap between back cover and SIM tray component, and it may not considered on designing step or, lack of reason to cost reduction to make it more cheaper by Oukitel.

Hope make it better by reading my article who anybody looking for solution to fix this problem as like me.

FLTK tech, HICON to Fl_RGB_Image

This is a simple source code for converting Windows HICON to Fl_RGB_Image for my own customized FLTK window.

Before understanding how it works, It must be requires understanding of some Windows API like LoadImage().

API, icon_to_flrgb()

Plus, to remove Fl_RGB_Image in safe, use this.


And, let know understand how it calls :

Sequence to convert image and apply, then discard.

remove_fl_rgb_image() may called in end of program, when it terminates or class destructor to release memory contains user allocated memory, and it is specification of FLTK 1.3.x.