Fix a bug and add a function.
- (bug) No support MaxY/XDpi
- (function) Add dpimode and MinY/XDpi