Bug 7921
Difference in size of the image when displayed in two different ways 23 May, 2022

Sivaprakash BKR
10 February, 2022
Product: | PowerBuilder | Category: | Controls & UI |
Version: | 2019 R3 | Build: | 2703 |
Classification: | Enhancement | Publishing: | Public |
Priority: | P3 | ||
Status: | Closed | Reason: | RECORDED AS ENHANCEMENT |

Appeon Product
23 May, 2022
#25
Ken Guo @Appeon
06 April, 2022
#24
Hi Sivaprakash, Yes. Using the Picture control is the most effective way at this moment. Though I have submitted this problem as a requirement to the development, there’s no plan to support it in a short term. Regards, Ken
Hi Sivaprakash, Yes. Using the Picture control is the most effective way at this moment. Though I have submitted this problem as a requirement to the development, there’s no plan to support it in a short term. Regards, Ken
Sivaprakash BKR
06 April, 2022
#23
Ken, As per your suggestion we have to go back to Picture control only as Resize blob object is not working. Hope this is the only solution available to us till you correct the Table Blob object.
Ken, As per your suggestion we have to go back to Picture control only as Resize blob object is not working. Hope this is the only solution available to us till you correct the Table Blob object.
Ken Guo @Appeon
06 April, 2022
#22
Hi Sivaprakash, I'm just touching base with you about this ticket. Please let us know if there is something else we can do in order to keep supporting you. Regards, Ken
Hi Sivaprakash, I'm just touching base with you about this ticket. Please let us know if there is something else we can do in order to keep supporting you. Regards, Ken
Ken Guo @Appeon
28 March, 2022
#21
Hi Sivaprakash, I'm just touching base with you about this ticket. Please let us know if there is something else we can do in order to keep supporting you. Regards, Ken
Hi Sivaprakash, I'm just touching base with you about this ticket. Please let us know if there is something else we can do in order to keep supporting you. Regards, Ken
Ken Guo @Appeon
20 February, 2022
#20
Hi Sivaprakash, As far as I know, there’s no other way to implement this. Only Table Blob Control can implement what you need. Regards, Ken
Hi Sivaprakash, As far as I know, there’s no other way to implement this. Only Table Blob Control can implement what you need. Regards, Ken
Sivaprakash BKR
18 February, 2022
#19
Thanks Ken for understanding our use case. Would like to know whether there is any way to display images in a grid / tabular datawindow (more than 1 row(s)) without creating image file in windows file system. ie. directly displaying the image in the datawindow ? [ of course using other than Table blob control ]
Thanks Ken for understanding our use case. Would like to know whether there is any way to display images in a grid / tabular datawindow (more than 1 row(s)) without creating image file in windows file system. ie. directly displaying the image in the datawindow ? [ of course using other than Table blob control ]
Ken Guo @Appeon
18 February, 2022
#18
Hi Sivaprakash, I can understand your use scenario. I will submit your question as a new enhancement to the development. However, I can confirm that there will be no plan to implement it in a short time. Currently development will prioritize some more important functions. I hope you can understand. Therefore, I suggest you try to use Picture Control or use Resize Blob Object to work around this white space problem. Regards, Ken
Hi Sivaprakash, I can understand your use scenario. I will submit your question as a new enhancement to the development. However, I can confirm that there will be no plan to implement it in a short time. Currently development will prioritize some more important functions. I hope you can understand. Therefore, I suggest you try to use Picture Control or use Resize Blob Object to work around this white space problem. Regards, Ken
Sivaprakash BKR
17 February, 2022
#17
Ken, The size of the control is not resizable, as it's fixed in every (preprinted) forms. Resizing the control makes the appearance of the image not desirable. So the requirement here is to fill the control with the image, fully. By using picture control, we satisfied our client, in our earlier version. In PB 2019, we planned to replace the picture control with Table blob control, as picture control required us to store the image of the students in window's file system. Hope you understand. Thanks.
Ken, The size of the control is not resizable, as it's fixed in every (preprinted) forms. Resizing the control makes the appearance of the image not desirable. So the requirement here is to fill the control with the image, fully. By using picture control, we satisfied our client, in our earlier version. In PB 2019, we planned to replace the picture control with Table blob control, as picture control required us to store the image of the students in window's file system. Hope you understand. Thanks.
Ken Guo @Appeon
17 February, 2022
#16
Hi Sivaprakash, The picture control is a control only for displaying a picture. The blob object is a control that can support multiple file types, so its characteristics is different from the picture control. You said that there is some white space in your blob object. Did you a width property set to the expresstion: blobobjectcontrol.height * imagefile_width/imagefile_height In this way, no matter how much is the blob object control's height, its width can be adjusted in accordance with the image. Regards, Ken
Hi Sivaprakash, The picture control is a control only for displaying a picture. The blob object is a control that can support multiple file types, so its characteristics is different from the picture control. You said that there is some white space in your blob object. Did you a width property set to the expresstion: blobobjectcontrol.height * imagefile_width/imagefile_height In this way, no matter how much is the blob object control's height, its width can be adjusted in accordance with the image. Regards, Ken
Sivaprakash BKR
17 February, 2022
#15
OK Ken, 1. In that case how the picture control displays the image to the full width of that control? It's also inside the datawindow. 2. Control's width is too small compared to the size of the image, FYI. Still we get white spaces. If the image is too small then there is a logic to reduce the width of the control. If we need to set the width of the control to the size of the image of the image then we need to show it (almost) to A4 page size.
OK Ken, 1. In that case how the picture control displays the image to the full width of that control? It's also inside the datawindow. 2. Control's width is too small compared to the size of the image, FYI. Still we get white spaces. If the image is too small then there is a logic to reduce the width of the control. If we need to set the width of the control to the size of the image of the image then we need to show it (almost) to A4 page size.
Ken Guo @Appeon
16 February, 2022
#14
Blob Object Hi Sivaprakash, #1. Blob image object display the image according to the image ratio. So when the object width is too big, it shows white spaces. Therefore, I set the width according to the image width/height ratio so that it doesn’t show white spaces no matter what its height is. #2. As far as I know, we don’t have any plan to support it at the moment. Regards, Ken
Created attachment 9727 Blob Object Hi Sivaprakash, #1. Blob image object display the image according to the image ratio. So when the object width is too big, it shows white spaces. Therefore, I set the width according to the image width/height ratio so that it doesn’t show white spaces no matter what its height is. #2. As far as I know, we don’t have any plan to support it at the moment. Regards, Ken
Sivaprakash BKR
15 February, 2022
#13
Ken If it's unsupported means, this issue will never be solved. Is that so?
Ken If it's unsupported means, this issue will never be solved. Is that so?
Sivaprakash BKR
15 February, 2022
#12
Ken, 1. The size of the image is much higher than the display size in the datawindow. So stretching is NOT required, IMO. Need to display the image to the size of the table blob field in the datawindow. [ Kindly check by opening the out1.png file in the paint and see the size ]. 2. Even if we increase the size of the table blob control in the datawindow, image size doesn't change. It (image) remains constant, whatever the size of the control. [ so your workaround may not work here, imo ]. 3. The picture control in the same datawindow displays rightly. Is that stretched or shrank, anyway?
Ken, 1. The size of the image is much higher than the display size in the datawindow. So stretching is NOT required, IMO. Need to display the image to the size of the table blob field in the datawindow. [ Kindly check by opening the out1.png file in the paint and see the size ]. 2. Even if we increase the size of the table blob control in the datawindow, image size doesn't change. It (image) remains constant, whatever the size of the control. [ so your workaround may not work here, imo ]. 3. The picture control in the same datawindow displays rightly. Is that stretched or shrank, anyway?
Ken Guo @Appeon
15 February, 2022
#11
Hi Sivaprakash, Blob Object with image in Datawindow doesn’t support automatic stretching of images, which causes the problem. So the workaround for it is: Dynamically adjust the width of Blob Object according to the image width/height ratio. For example, save the photo_height and photo_width of the current png image in the database. Set the width property of Blob Object as an expression: Long(describe('blob_1.height')) * photo_width/photo_height. Regards, Ken
Hi Sivaprakash, Blob Object with image in Datawindow doesn’t support automatic stretching of images, which causes the problem. So the workaround for it is: Dynamically adjust the width of Blob Object according to the image width/height ratio. For example, save the photo_height and photo_width of the current png image in the database. Set the width property of Blob Object as an expression: Long(describe('blob_1.height')) * photo_width/photo_height. Regards, Ken
Sivaprakash BKR
14 February, 2022
#10
Is there any immediate workaround to resolve this issue? It's an urgent requirement.
Is there any immediate workaround to resolve this issue? It's an urgent requirement.
Sivaprakash BKR
14 February, 2022
#9
Here is the structure -- Table: public.cl_student_photo -- DROP TABLE public.cl_student_photo; CREATE TABLE public.cl_student_photo ( studentphotopk character varying(32) COLLATE pg_catalog."default" NOT NULL, companycode character varying(10) COLLATE pg_catalog."default" NOT NULL, registrationnumber character varying(25) COLLATE pg_catalog."default" NOT NULL, photo bytea, locked character(1) COLLATE pg_catalog."default" NOT NULL, insertuser character varying(50) COLLATE pg_catalog."default" NOT NULL, insertdate timestamp without time zone NOT NULL, insertcomputer character varying(50) COLLATE pg_catalog."default" NOT NULL, modifieduser character varying(50) COLLATE pg_catalog."default", modifieddate timestamp without time zone, modifiedcomputer character varying(50) COLLATE pg_catalog."default", CONSTRAINT "cl_student_photo_PK" PRIMARY KEY (studentphotopk), CONSTRAINT "cl_student_photo_studentname_FK" FOREIGN KEY (companycode, registrationnumber) REFERENCES public.cl_student_name (companycode, registrationnumber) MATCH SIMPLE ON UPDATE RESTRICT ON DELETE RESTRICT ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; ALTER TABLE public.cl_student_photo OWNER to postgres; -- Index: cl_student_photo_IX -- DROP INDEX public."cl_student_photo_IX"; CREATE UNIQUE INDEX "cl_student_photo_IX" ON public.cl_student_photo USING btree (companycode COLLATE pg_catalog."default" ASC NULLS LAST, registrationnumber COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default;
Here is the structure -- Table: public.cl_student_photo -- DROP TABLE public.cl_student_photo; CREATE TABLE public.cl_student_photo ( studentphotopk character varying(32) COLLATE pg_catalog."default" NOT NULL, companycode character varying(10) COLLATE pg_catalog."default" NOT NULL, registrationnumber character varying(25) COLLATE pg_catalog."default" NOT NULL, photo bytea, locked character(1) COLLATE pg_catalog."default" NOT NULL, insertuser character varying(50) COLLATE pg_catalog."default" NOT NULL, insertdate timestamp without time zone NOT NULL, insertcomputer character varying(50) COLLATE pg_catalog."default" NOT NULL, modifieduser character varying(50) COLLATE pg_catalog."default", modifieddate timestamp without time zone, modifiedcomputer character varying(50) COLLATE pg_catalog."default", CONSTRAINT "cl_student_photo_PK" PRIMARY KEY (studentphotopk), CONSTRAINT "cl_student_photo_studentname_FK" FOREIGN KEY (companycode, registrationnumber) REFERENCES public.cl_student_name (companycode, registrationnumber) MATCH SIMPLE ON UPDATE RESTRICT ON DELETE RESTRICT ) WITH ( OIDS = FALSE ) TABLESPACE pg_default; ALTER TABLE public.cl_student_photo OWNER to postgres; -- Index: cl_student_photo_IX -- DROP INDEX public."cl_student_photo_IX"; CREATE UNIQUE INDEX "cl_student_photo_IX" ON public.cl_student_photo USING btree (companycode COLLATE pg_catalog."default" ASC NULLS LAST, registrationnumber COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default;
Ken Guo @Appeon
14 February, 2022
#8
Hi Sivaprakash, Thanks for reporting this problem! We reproduced it on our end now and will do further research to figure it out. We will keep you posted about the progress. BTW, PB 12.6 has the same issue as well. Regards, Ken
Hi Sivaprakash, Thanks for reporting this problem! We reproduced it on our end now and will do further research to figure it out. We will keep you posted about the progress. BTW, PB 12.6 has the same issue as well. Regards, Ken
Ken Guo @Appeon
14 February, 2022
#7
Hi Sivaprakash, Thanks for providing this out1.png. Please also help provide the table syntax of cl_student_photo. Regards, Ken
Hi Sivaprakash, Thanks for providing this out1.png. Please also help provide the table syntax of cl_student_photo. Regards, Ken
Sivaprakash BKR
12 February, 2022
#6
out1.png (3456KB) Hello Ken Here is the image out1.png. HTH
Created attachment 9696 out1.png (3456KB) Hello Ken Here is the image out1.png. HTH
Ken Guo @Appeon
11 February, 2022
#5
Hi Sivaprakash, Since I constantly failed to restore your database and got Failed: exit code 1 returned, please help directly send the out1.png file used in your case to us for analysis. Regards, Ken
Hi Sivaprakash, Since I constantly failed to restore your database and got Failed: exit code 1 returned, please help directly send the out1.png file used in your case to us for analysis. Regards, Ken
Sivaprakash BKR
10 February, 2022
#4
Ken, I missed to mention that I'm using psqlodbc_10_03_0000-x86 to connect to PG Database.
Ken, I missed to mention that I'm using psqlodbc_10_03_0000-x86 to connect to PG Database.
Sivaprakash BKR
10 February, 2022
#3
Image Size Issue.rar (654KB) Hello Ken, Here is the required file in rar format. It contains 1. All PBL's (2019 R3) 2. PostgreSQL database backup file (backup taken using pg_dump). Open the application, change database connection parameters. Run the application and see the difference. Thanks.
Created attachment 9669 Image Size Issue.rar (654KB) Hello Ken, Here is the required file in rar format. It contains 1. All PBL's (2019 R3) 2. PostgreSQL database backup file (backup taken using pg_dump). Open the application, change database connection parameters. Run the application and see the difference. Thanks.
Ken Guo @Appeon
10 February, 2022
#2
Hi Sivaprakash, Can you provide the image file and the PBL file? This would help us to analyze the issue. Thanks for your understanding! Regards, Ken
Hi Sivaprakash, Can you provide the image file and the PBL file? This would help us to analyze the issue. Thanks for your understanding! Regards, Ken
Sivaprakash BKR
10 February, 2022
#1
image size issue 1.PNG (148KB) *Phenomenon: 1. To display an picture stored in a blob column (bytea in postgreSQL) 2. Used Picture control to display the image in a datawindow 3. Used Table blob control to display the same image, in the same datawindow 4. Both controls' size are same (width and height). 5. Size of the picture displayed in TableBlob control is smaller, with white spaces on the right side. 6. Size of the image stored in the database is 1170x1500 pixels. *Reproduce Steps: 1. Store an image in a blob column (or bytea in postgreSQL) 2. Show the image through a picture control. 3. Side by side show the same image through Table Blob column 4. Check the difference in size of the display. Remarks: Discussion that happened in the community forum. https://community.appeon.com/index.php/qna/q-a/difference-in-size-of-the-image-when-displayed-in-two-different-ways Any immediate work around?
Created attachment 9664 image size issue 1.PNG (148KB) *Phenomenon: 1. To display an picture stored in a blob column (bytea in postgreSQL) 2. Used Picture control to display the image in a datawindow 3. Used Table blob control to display the same image, in the same datawindow 4. Both controls' size are same (width and height). 5. Size of the picture displayed in TableBlob control is smaller, with white spaces on the right side. 6. Size of the image stored in the database is 1170x1500 pixels. *Reproduce Steps: 1. Store an image in a blob column (or bytea in postgreSQL) 2. Show the image through a picture control. 3. Side by side show the same image through Table Blob column 4. Check the difference in size of the display. Remarks: Discussion that happened in the community forum. https://community.appeon.com/index.php/qna/q-a/difference-in-size-of-the-image-when-displayed-in-two-different-ways Any immediate work around?
OS:
All
Platform:
All
Database Type:
PostgreSQL
Database Version:
11