feat: resize images

This commit is contained in:
Richard Ramos 2020-07-20 16:10:35 -04:00 committed by RichΛrd
parent 5befb45943
commit e557c6118f
2 changed files with 5 additions and 0 deletions

View File

@ -36,3 +36,6 @@ proc signal_handler*(receiver: pointer, signal: cstring, slot: cstring) =
var dosqobj = cast[DosQObject](receiver)
if(dosqobj.isNil == false):
dos_signal(receiver, signal, slot)
proc image_resizer*(imagePath: string, maxSize: int = 2000): string =
result = $dos_image_resizer(imagePath.cstring, maxSize.cint)

View File

@ -302,3 +302,5 @@ proc dos_qabstracttablemodel_create(modelPtr: NimQAbstractTableModel,
qaimCallbacks: DosQAbstractItemModelCallbacks): DosQAbstractTableModel {.cdecl, dynlib: dynLibName, importc.}
proc dos_qabstracttablemodel_parent(modelPtr: DosQAbstractTableModel, index: DosQModelIndex): DosQModelIndex {.cdecl, dynlib: dynLibName, importc.}
proc dos_qabstracttablemodel_index(modelPtr: DosQAbstractTableModel, row: cint, column: cint, parent: DosQModelIndex): DosQModelIndex {.cdecl, dynlib: dynLibName, importc.}
proc dos_image_resizer(imagePath: cstring, maxSize: cint): cstring {.cdecl, dynlib: dynLibName, importc.}