|
| [WM20 -android] Dresize() |
| Iniciado por guest, 14,sep. 2015 11:12 - 3 respuestas |
| |
| | | |
|
| |
| Publicado el 14,septiembre 2015 - 11:12 |
i try to resize image in image control and save to database
the original image file resolution 265 x 183
i load into image control which the image control height and width i set to 64x64 IF dResize(IMG_ImgSml,64,64) = True THEN m_imageSml = dSaveImageJPEG(IMG_ImgSml, inMemory)
i output the resized image to a file , I notice strange stuff 1. the image file show image width and height show 96 x 96 not 64 x 64 that i want
2. an empty blue space show up

Black color area is image resized area
how come ? am I missing something ? |
| |
| |
| | | |
|
| | |
| |
| Publicado el 14,septiembre 2015 - 11:13 |
| sorry wrong attach the image, here the output of resized image |
| |
| |
| | | |
|
| | |
| |
| Publicado el 14,septiembre 2015 - 13:51 |
I have the same issue; to output a 800x600 file the image size has to be 400x300.
If you don't need to compress the image, VideoGenerateThumbnail creates images to the size you specify, but doesn't compress them. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,septiembre 2015 - 05:45 |
Hi Peter ,
after try and error, I finally understand the problem is image control
few things I understand 1. image control accept image in image variable and image buffer 2. can convert buffer variable into image variable 3. cannot convert image variable into buffer variable
what I want to do - resize image to 64x64 and convert into buffer in order to store into database
what you must set to image control 1. the image control size bigger than 64x64 2. set image control display mode to 100% 3. set image control border to none 4. do not use dresize() on image control . use on image variable 5. after resize put into image control , resize image control 64x64 6. call dSaveImageJPEG()
m_thumbImg is Image m_thumbImg = dLoadImage(arg_ImgFileName)
IF dResize(m_thumbImg,64,64) = True THEN IMG_ImgSml..Value = m_thumbImg IMG_ImgSml..Height = 64 IMG_ImgSml..Width = 64 m_thumbBuf = dSaveImageJPEG(IMG_ImgSml,inMemory)
------------------------------------------------------------------------------------------ Notes :
The blue color area created is because your image size is smaller than the size of image control
hope will help |
| |
| |
| | | |
|
| | | | |
| | |
|