Couldn't able to reduce the size of the image while storing in the report

Hi friends,

Im trying to save the image in my table, so that these are the steps that I follow...

First, I created a table:
CREATE TABLE "A_IMAGES"
(
"IMAGE_ID" NUMBER(10,0) NOT NULL ENABLE,
"FILE_NAME" VARCHAR2(4000) NOT NULL ENABLE,
"BLOB_CONTENT" BLOB,
"MIME_TYPE" VARCHAR2(4000),
CONSTRAINT "A_IMAGES_PK" PRIMARY KEY ("IMAGE_ID") ENABLE
)
After this sequence, relaxation and the procedure,.

Let me show you the procedure
create or replace PROCEDURE "DISPLAY_IMAGE"
(
inID NUMBER
)
AS
vMIME VARCHAR2(48);
vLENGTH NUMBER;
vFILENAME VARCHAR2(2000);
vBLOB BLOB;
BEGIN
SELECT MIME_TYPE, BLOB_CONTENT, FILE_NAME, DBMS_LOB.GETLENGTH(BLOB_CONTENT)
INTO vMIME, vBLOB, vFILENAME, vLENGTH
FROM A_IMAGES
WHERE IMAGE_ID = inID;
owa_util.mime_header(nvl(vMIME, 'application/octet'), FALSE);
htp.p('Content-length: ' || vLENGTH);
owa_util.http_header_close;
wpg_docload.download_file(vBLOB);
END;
Everything worked fine, but the following error occurs when im trying to insert an image into a table with a browse button.
ORA-06502: PL/SQL: digital or value error: character of number conversion error
The error above if I include the following line in the source code of my region report...
' < img src = "#OWNER #." DISPLAY_IMAGE? inID =' | NVL (IMAGE_ID, 0) | "" height = "50" width = "50" / > "IMAGE
mainly, I added the above line in my source region only query for the image (size setting)...

If I give the report source region coding as the means below, it works like a charm
:)
SELECT FILE_NAME,IMAGE_ID,
dbms_lob.getlength("BLOB_CONTENT") "IMAGE" 
FROM A_IMAGES
ORDER BY FILE_NAME
But what is the problem with the above code means, as he worked successfully and I can also see the images in the report, but each image is looking too big...

In order to reduce the size of the image that I gave this line,
' < img src = "#OWNER #." DISPLAY_IMAGE? inID =' | NVL (IMAGE_ID, 0) | "'" height = "50" width = "50" / > ' IMAGE
but if I gave ways online, error is occurring as the image does not store in a size appropriate for the table...

But there, I noticed one thing,

dbms_lob.getlength ("BLOB_CONTENT") 'IMAGE' is normally in a type of NUMBER , and it works very well...

But instead of dbms_lob.getlength("BLOB_CONTENT") 'IMAGE', if I replaced it with *' < img src = "#OWNER #." DISPLAY_IMAGE? inID =' | NVL (IMAGE_ID, 0) | ' ' ' height = '50' * width = "50" / > ' IMAGE means, it is converted to a string...

I think mainly for that alone, it's show error...

How to rectify this problem friends...

I also downloaded this app in my sample workspace,

Please check with this application

application name: region 50787-new report and here is the link http://apex.oracle.com/pls/apex

WS: Mini_WS
United Nations: [email protected]
PWD: mini4i

Thanks in advance

Kind regards
Mini

I created a new page 3 which shows how to use the CSS (in the header HTML page) to control the scaling of the images displayed in the reports using BLOB support declarative.

However, you really need to use generated thumbnails to the right size instead of scaling of the images in the browser. If the images used in your demo are for guidance, so they are waaayyyy too big to use in this scenario. This just kill performance on your web server and database and unnecessarily consume massive amounts of band network bandwidth. Your DBA, system administrators, ISPS and users will be very unhappy.

Tags: Database

Similar Questions

  • I have Adobe Acrobat Standard DC and I would be able to reduce the size of PDF files that I could with Adobe Acrobat Professional. Reduce size PDF with Adobe Acrobat Standard DC file? If Yes, where is the button? PRO button was in the "D".

    I have Adobe Acrobat Standard DC and I would be able to reduce the size of PDF files that I could with Adobe Acrobat Professional. Reduce size PDF with Adobe Acrobat Standard DC file? If Yes, where is the button? IN Pro, the button was in the drop down "Document"... Thanks for the tips, Bob

    Hi Robert,.

    Please visit the following link: https://helpx.adobe.com/acrobat/using/optimizing-pdfs-acrobat-pro.html

    Kind regards

    Rahul

  • Not able to reduce the size of data file

    Hi all
    I use Oracle Database 11.2.0.2 etdansl ASM instance. Today, I noticed that the use of the disk is almost full in my disk groups. I thought so to reduce the size of large size Tablespace data files.

    Select file_name, bytes/1024/1024 of dba_data_files where nom_tablespace = 'FRARDTA9T ';

    FILE_NAME BYTES/1024/1024
    ------------------------------------------------------------------------- -------------------------------------
    +DATAJDFSWM/t1erp90d/datafile/frardta9t01.dbf 81000

    ALTER database datafile '+ DATAJDFSWM/t1erp90d/datafile/frardta9t01.dbf' resize 40000M;

    I get the following error.


    ERROR on line 1:
    ORA-03297: file contains data beyond the requested value of RESIZING

    Here is the result for DBA_FREE_SPACE


    SQL > select * from dba_free_space where nom_tablespace = 'FRARDTA9T ';

    NOM_TABLESPACE, FILE_ID, BLOCK_ID BYTES BLOCKS RELATIVE_FNO
    -------------------------------------------- ---------- -------------- ---------- ----------- -----------------
    104 97728 5767168 704 1024 FRARDTA9T
    104 189016 4521984 552 1024 FRARDTA9T
    104 277016 5046272 616 1024 FRARDTA9T
    104 277680 655360 80 1024 FRARDTA9T
    104 1630336 3288334336 401408 1024 FRARDTA9T
    104 2031744 4160749568 507904 1024 FRARDTA9T
    104 2539648 4160749568 507904 1024 FRARDTA9T
    104 3047552 4160749568 507904 1024 FRARDTA9T
    104 3555456 4160749568 507904 1024 FRARDTA9T
    104 4063360 4160749568 507904 1024 FRARDTA9T
    104 4571264 4160749568 507904 1024 FRARDTA9T
    104 5079168 4160749568 507904 1024 FRARDTA9T
    104 5587072 1543503872 188416 1024 FRARDTA9T
    104 5775616 2616197120 319360 1024 FRARDTA9T
    104 6094976 4160749568 507904 1024 FRARDTA9T
    104 6637472 2803630080 342240 1024 FRARDTA9T
    104 7550488 558694400 68200 1024 FRARDTA9T
    104 7618688 4160749568 507904 1024 FRARDTA9T
    104 8126592 4160749568 507904 1024 FRARDTA9T
    104 8634496 4160749568 507904 1024 FRARDTA9T
    104 9142400 4160749568 507904 1024 FRARDTA9T
    104 9650304 4160749568 507904 1024 FRARDTA9T
    104 10223520 786432 96 1024 FRARDTA9T

    Please suggest me how to solve this problem... There's fragmentation the culprit who don't let not releasing me a space?

    -Saha

    the tablespace is fragmented maybe you defragment to free up space. There are several features to do more or less effective.

    -change the movement of the table / index
    exp/imp
    -reduce the space
    -dbms_redefinition
    -DEC

    each technology has advantages and disadvantages...
    I suggest starting by shrink space, but do not start with larger items...

    HTH

  • not able to view the report in PDF format from the worksapce

    Hi all

    I want to see my reports in PDF format. So, that from the workspace
    I opened my report and chose run as a PDF, but I can not
    see it in PDF format. It shows me page cannot be displayed.
    Can someone tell me how to see the reports in PDF format?


    Thank you

    Hello

    I take that you have installed is:

    -Adobe Acrobat Distiller Server 8.0 or 6.0
    -GPL Ghostscript 8.63; AFPL Ghostscript 8.54 or 8.51; or GNU Ghostscript 7.0.6

    On the server and the Adobe acrobat reader on the client.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Not able to reduce the size of the police after turning off the projector.

    I use my laptop for powerpoint presentation for the students of the University. I use a Lenovo Thinkpad SL500. However, there is no problem to connect to the projector. The last time that I disconnected the projector, the size of the font is not some up to normal. I tried to go to the option of customization and selected the smaller font. Even after a reboot, the font size is not down to normal. The next time I plugged the projector, the size of the font was normal. After disconnecting, the font size is increased further. Help, please.

    Hi MamoonSyed,

    1 - is the maximum resolution (800 × 600 pixels), your computer can get?
    2. what happens when you set a higher resolution?

    You can try to set the resolution higher than 1024 × 768 or higher and check.

  • not able to view the report header on each page of the rtf report

    Hi all

    I used <? Start: body? > and <? : slim body? > in rtf to repeat the value of the region as a header on each page. The region is displayed when there is a change in the region, it does not display on each page in the pdf output. Any suggestion. I can send the rtf

    Sushil

    If you want to repeat the value of the region on each page, you must make sure that the region field is placed above the tag. In addition, you must use @section for the code group. I responded to your email as well. Take a look at the model that I sent to see if the output is acceptable.

    Thank you

    Bipuser

  • Unable to reduce the size of the partition

    Original title: size minimum SSD of Partition of Windows 7

    I have windows 7 Ultimate.  I upgraded my SanDisk SSD 960 GB from a HD storage device.  I reloaded windows 7 on SSD.  Once which was finished, I tried to partition the SSD drive in three sections of 310 GB each. I opened the editor/partition Manager Windows and shrink selected by 610 GB SSD.  I couldn't do the frist of 450GB shrink who left the first main drive at about 480 GB.  I know that the numbers add up to 960 GB but it is what has been shown.  I'm not able to reduce the small first partition (C).  What must I do to reduce the first hard drive to a smaller size (windows OS) located on this section?

    Hello, Kim.

    I understand the inconvenience you encountered.

    According to the description, I understand you want to reduce the first partition.

    I understand the inconvenience you encountered.

    I suggest you refer to the steps responded by Umesh P on November 18,2009.

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-performance/how-do-i-extend-the-volume-of-my-c-drive-in/344b6a36-BCD1-4d7f-B638-3a4d048ecea0

    Hope this information is useful. Please let us know if you need help with Windows.

  • How to reduce the size of a photo of 6 MB to 800ko?

    I would like to be able to reduce the size of a photo in Photo Mac or Photoscape 6 MB to 800 KB. Before I could do this in Picasa when I exported photo.

    If change you a file standard .jpg you can reduce 'quality' option to reduce his smaller size. You can use the shareware, GraphicConverter for this application. You may also be able to do in the Photos when you export the image. Overview, may be able too, but I have not used for this purpose.

  • Reduce the size of the folder Windows/install in Windows 7

    I found many messages touting the benefits of a utility that MS formerly offered to reduce the size of the folder Windows/Installer for earlier versions of Windows called MSIZAP.exe.  Of course, this is not recommended and has been replaced by a FixIt.

    My main drive has grown to use 60 GB!  I install most everything I am able to install it on other players.  On the 60 GB, the Windows folder using 23.6 GB.
    I have already reduced the Windows/winsxs folder to 10.6 GB 6.1 GB with the MARIKEL utility.
    How am I able to reduce the folder Windows/Installer of her current 7.33 GB size?  This file consumes almost 1/3 of the already massive amount of the Windows folder?
    Thanks in advance!
    Hello

    The Installer folder may be located in the folder C:\Windows\Installer. (Folder install is a hidden folder).

    We can delete the files in the folder, but they will be required when you try to uninstall some programs that installed with Windows Installer. So after you delete these files, we will need to reinstall or repair a related program if they cannot be uninstalled with error "needs to uninstall previous installation".

    However, instead of delete the folder of Windows install, I should delete you them using Disk Cleanup.

    In addition, reducing the space for the restoration of the system.

    Reference:
    How much space does System Restore disk requires?

    WARNING: If you reduce the disk space to be smaller than the space that is currently used by the system of protection, older restore points, including previous versions of files, will be deleted.
  • How can I reduce the size of the screen for lightroom?

    I know it's stupid, but I can't seem to find a way to reduce to the minimum the Lightroom screen. I also have not been able to reduce the size of the screen. I need to refer to other things on my desk while working in Lightroom, but cannot. He drives me crazy!

    I tried moving them from bottom right... nothing helps.

    Lightroom 5 and later: use SHIFT - F once or several times

    Lightroom 4 and earlier versions: use F once or several times

  • Is there a way to reduce the size of images without doing it in photoshop?

    Hi all

    I have a document with a ton of images, all of high resolution press ready. I need now this doc to the web, even at low resolution, the pdf file is still 6 MB.

    Is there a way to reduce the images in the file for the web without batch processing in photoshop? Just curious.

    See you soon

    S

    You should be able to reduce the size of the PDF file by changing export settings. In the export settings you can flatten transparency (PDF 1.3 can produce a smaller file), convert CMYK to RGB (output > color Conversion), lower quality of resolution and compression (Compression tab).

  • Refresh the report to modal page

    Hello

    I use Apex 5 and with a modal page, I'm not be able to refresh the report that calls this page.

    • I have a region to report on a regular page.
    • I add a button to call the modal page.
    • I record my data, I click on save and return to the page of the appellant.

    My report is not updated. If I create a 'classic form on a page with the report' and the form is modal, when I return to the report, the data is refreshed.

    What should I do to refresh the data?

    Thank you.

    Hello

    on your calling page that contains the report, add dynamic action on the button (or region) who listens to the event "dialog closed." As an action we "Refresh" and indicate your area of report.

    As soon as your modal dialog box is closed, this event will be raised in the calling page and your report will cool off. If you look at our sample Application database, you will find several examples of using this technique.

    Concerning

    Patrick

    Member of the APEX development team

    My Blog: http://www.inside-oracle-apex.com

    APEX Plug-Ins: http://apex.oracle.com/plugins

    Twitter: http://www.twitter.com/patrickwolf

  • Run the report in a specific folder

    Would it not be possible to add the ability to run the virtual computer report on a specific folder in vCenter?  Our vCenter has folders separated for various departments within our Organization, and it would be useful to be able to run the report on each of these record independently.  I checked through similar scripts in the repository but not found anywhere where this has been done.  Thank you!

    Hello

    No, currently how the script is written, its pretty hard to filter on a file especially vCenter. The script currently travels all ESX(I) hosts in your environment, and then from there, it crosses the VMS in each host out information relavent. It is not impossible, but it requires a bit of code to support change.

    If you are looking for an example of list of virtual machines by a particular VM folder, there is a script in the repo called "listVMByFolder.pl" that can give you a starting point.

    Good luck

  • Showing the Refresh button &amp; download at the top of the report

    Hi BI experts,.

    I tried to deal with 'RESULTLINKCELL' of the source page and I pasted in the text it's good. But by default when I click on download it takes the previous. 'Here show state ID' not dynamically evolves when I did it by copying from the source of the page.

    Please let me know if there is another way to put the download button on the top of the report and it should be able to download the report based on the date that I select from the command prompt.


    Thank you
    Chak

    Hi Chak,

    Follow this,

    1. open the dasboard State and ensure that report links are already added

    2. see page source and search for this text, idDownloadLinksMenud

    3 copy the source code, it will be like

    ""[a name = "ReportLinkMenu" href = "javascript:void (null)" onclick = "return NQWPopupMenu (event,'idDownloadLinksMenud:dashboard ~ p:o9japenelmspl0m8 ~ r: 0cf3u00etvs76p2d')" > download [a].

    * Replace [] '<' and="" '="">'.

    4. Add a text above the analysis object in the dashboard. Paste the code copied into the text object and check the box 'Contains the HTML markup' and save.

    This will add a download link at the top of page, of which the result may vary based on the quick selection.

    Rgds,
    DpKa

  • to limit the reports based on the responsibility of the user

    Hello

    is it possible to limit the reports displayed in the request for enforcement THAT LOV based on the responsibility of the user

    for example a person in operations are not able to see the report, which belongs to the admin of the lov

    kindly guide me

    thanking in advance

    is it possible to limit the reports displayed in the request for enforcement THAT LOV based on the responsibility of the user

    for example a person in operations are not able to see the report, which belongs to the admin of the lov

    You can achieve this by creating a new responsibility and exclude these concurrent programs of the Group requested that is attached to this new responsibility. Then assign the new responsibility of the user.

    Thank you
    Hussein

Maybe you are looking for

  • Work of missing MP3

    Hello iTunes started work (apparently random) deletion of my MP3 that them had embedded in the ID3 tag. He not only include securities that I select in iTunes, before choosing them they work, after selecting the action is removed immediately. Does an

  • The Update Service error OR

    Hello I have a problem with the installation of updates using Update Service. I was able to download all the updates, but I'm unable to install them. I got the following error. The update version is 2.3.0.70. I tried to run as administrator and disab

  • BUGCODE_USB_DRIVER

    DATE: November 20, 2013 place: PA, USA. Well, my HP Pavilion dv6 notebook PC's display blue screen. Technical information: (blue screen) is. STOP: 0X000000FE (0 X 0000000000000005, 0XFFFFFA80049E71AO, 0X0000000080863B34, 0XFFFFFA8004C4D250) I TRIED E

  • .28 battery Manager (use) accurate?

    Something weird with my phone. For a week now under battery Manager > battery use phone indicates that Maps use 99% of the battery. (As in, cards and nothing else, no display, idling, nothing) However, it doesn't show up as an application running and

  • When I try to log on I GRT windows updates and keep it in this mode

    I can not connect on util I try ro m.o. finish process