Bitmap

Hello ,
My requirement is to place the logo in already existing window. Can anyone tell me the full syntax of  BITMAP command in SAPSCRIPT. Is there any alignment option assosciated with this command.
Thanks & Regards,
Radha.

Hi Radha
Use transaction SE78 to inmport graphics to SAP.
In the form painter, you can either include directly to the form using menu Edit->Graphic->Create or using the
INCLUDE statement in a window.
To use an INCLUDE stanment, goto into the woindow script editor and use menu Include->Graphic. The include can
look like this for a bitmap:
/: BITMAP MYLOGO OBJECT GRAPHICS ID BMAP TYPE BMON
BMON for Mono Color Images
BCOL for Color Images
OR
Check this link
http://sap.niraj.tripod.com/id19.html
Hope this info will be helpful
<REMOVED BY MODERATOR>
Karan
Edited by: Alvaro Tejada Galindo on Jun 3, 2008 1:26 PM

Similar Messages

  • A generic error occurred in GDI+ while assing tiff image file to Bitmap and Image

    Hi,
    I am getting "A generic error occurred in GDI+" error while reading the tiff image file to Bitmap or Image.
    Below is my sample code.
    string filePath=@"c:\Images\sample.tif";
    Bitmap bmp=new Bitmap(filePath);   // here getting exception
    int totalpages=bmp.GetFrameCount(.....);
    etc......
    I tried using Bitmap.FromFile() and also from FromStream() even for Image also but there is no use.
    Moreover i m having full permissions for the file path and the tiff file is having multiple pages.
    Can anyone help me to solve this issue please.
    Thanks & Regards,
    Kishore
    Kishore

    Make sure that the Tif file is valid (can other software open it)?  If you are able to save a Tif using GDI+, try saving that Tif, then opening it.  Part of me wonders if there is something about that specific Tif that GDI+ doesn't like.
    You could also try using WIC to open the TIF, perhaps you would have better luck there.

  • Error while uploading BITMAP image in SAP through SE78.

    Hello all,
    I am getting below error while uploading image into SAP through SE78.
    'Bitmap file: No color table available (True Color, Bitcount 32)'.
    I have tried searching for solution and got some help from below reply from a thread:
    You may do these options:
    1. Lower the resolution of the image
    2. Lower the file size of the image
    Regards,
    Reymar
    I have got a image size of 6.14 KB and resolution of 72*72 dots per inch.
    Thanks in Advance.
    - Jayant Sahu.

    Hi Daniel,
    First of all, if you dont mind, start a new thread for your question please.
    Anyways, answer to your question is --
    You need to save your picture with lower-most bits BITMAP Type. When you were saving your picture as .bmp, take care you are passing lower-most BITMAP type and not 24-bit as it may be as default.
    This way, your problem would be resolved.
    Thanks.
    Kumar Saurav.

  • Diff b/w btree and bitmap index ?

    What is the difference between btree and bitmap index ?
    which one to used and when.
    how they are differ from each other.

    you'd love to see
    http://www.oracle.com/technology/pub/articles/sharma_indexes.html

  • Multi-column BITMAP index vs. multiple BITMAP indices?

    Given the table (simple, made-up example):
    CREATE TABLE applicant_diversity_info (
    applicant_diversity_id NUMBER(12), PRIMARY KEY(applicant_diversity_id),
    apply_date DATE,
    ssn_salted_md5 RAW(16),
    gender CHAR(1), CHECK ( (gender IS NULL OR gender IN ('M','F')) ),
    racial_continent VARCHAR2(30), CHECK ( (racial_continent IS NULL
    OR racial_continent IN ('Europe','Africa','America','Asia_Pacific')) ),
    ethnic_supergroup VARCHAR2(30), CHECK ( (ethnic_supergroup IS NULL OR ethnic_supergroup IN ('Latin American','Other')) ),
    hire_salary NUMBER(11,2),
    hire_month DATE,
    termination_salary NUMBER(11,2),
    termination_month DATE,
    termination_cause VARCHAR2(30), CHECK ( (termination_cause IS NULL
    OR termination_cause IN ('Resigned','Leave of Absence','Laid Off','Performance','Cause')) )
    Oracle (syntactically) allows me to create either one BITMAP index over all four small-cardinality columns
    CREATE BITMAP INDEX applicant_diversity_diversity_idx ON applicant_diversity_info (
    gender, racial_continent, ethnic_supergroup, termination_reason );
    or four independent indexes
    CREATE BITMAP INDEX applicant_diversity_gender_idx ON applicant_diversity_info ( gender );
    CREATE BITMAP INDEX applicant_diversity_race_idx ON applicant_diversity_info ( raceial_continent );
    etc.
    What is the difference between the two approaches; is there any meaningful difference in disk-space between the one multi-colum index and the four single-column indexes? Does it make a difference in what the query-planner will consider?
    And, if I define one multi-column BITMAP index, does the order of columns matter?

    >
    What is the difference between the two approaches; is there any meaningful difference in disk-space between the one multi-colum index and the four single-column indexes? Does it make a difference in what the query-planner will consider?
    And, if I define one multi-column BITMAP index, does the order of columns matter?
    >
    You may want to read this two-part blog, that answers that exact question, by recognized expert Richard Foote
    http://richardfoote.wordpress.com/2010/05/06/concatenated-bitmap-indexes-part-i-two-of-us/
    http://richardfoote.wordpress.com/2010/05/12/concatenated-bitmap-indexes-part-ii-everybodys-got-to-learn-sometime/
    As with many things Oracle the answer is 'it depends'.
    In short the same considerations apply for a concatenated index whether it is bitmap or b-tree: 1) will the leading column usually be in the predicate and 2) will most or all of the index columns be specified in the queries.
    Here are some quotes from part 1
    >
    Many of the same issues and factors in deciding to create a single, multi-column index vs. several, single column indexes apply to Bitmap indexes as they do with B-Tree indexes, although there are a number of key differences to consider as well.
    Another thing to note regarding a concatenated Bitmap index is that the potential number of index entries is a product of distinct combinations of data of the indexed columns.
    A concatenated Bitmap index can potentially use less or more space than corresponding single column indexes, it depends on the number of index entries that are derived and the distribution of the data with the table.
    >
    Here is the lead quote from part 2
    >
    The issues regarding whether to go for single column indexes vs. concatenated indexes are similar for Bitmap indexes as they are for B-Tree indexes.
    It’s generally more efficient to access a concatenated index as it’s only the one index with less processing and less throwaway rowids/rows to contend with. However it’s more flexible to have single column indexes, especially for Bitmap indexes that are kinda designed to be used concurrently, as concatenated indexes are heavily dependant on the leading column being known in queries.

  • Bitmap index Vs B-Tree index

    Hi All,
    Could some one please let me know how Bitmap indexes are useful compared to B-Tree indexes on low-cardinality columns ?.
    Thanks,
    -Kumar.

    >>
    As Re: why oracle db 9i optimizer can't choose to use the bitmap index? there are a number of issues with bitmap indexes. Your best bet is to read these three articles by Jonathan Lewis.
    It does pay us to understand how the optimizer works with bitmap indexes. I posted some Re: Cost-based optimizer behavior to show how indexes on even very low valued columns can be useful in certain circumstances.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • I'm working with directx and it does working only on some of the Bitmaps. Why it's not working on the others ?

    The question is not so clear i will try to explain here.
    I have a trackBar scroll event:
    private void trackBar1_Scroll(object sender, EventArgs e)
    LoadPictureAt(trackBar1.Value, sender);
    ConvertedBmp = ConvertTo24(trackBar1FileInfo[trackBar1.Value].FullName);
    ConvertedBmp.Save(ConvertedBmpDir + "\\ConvertedBmp.bmp");
    mymem = ToStream(ConvertedBmp, ImageFormat.Bmp);
    backTexture = TextureLoader.FromStream(D3Ddev, mymem);
    scannedCloudsTexture = new Texture(D3Ddev, 512, 512, 1, Usage.Dynamic, Format.A8R8G8B8, Pool.Default);
    timer1.Stop();
    Button1Code();
    timer1.Start();
    b1 = ConvertedBmp;
    b1.Save(ConvertedBmpDir + "\\b1.bmp");
    trackBar2.Enabled = false;
    if (!this.backgroundWorker1.IsBusy)
    label2.Text = "מעבד נתונים";
    this.backgroundWorker1.RunWorkerAsync();
    else
    this.backgroundWorker1.CancelAsync();
    First LoadPictureAt method:
    private bool LoadPictureAt(int nIndex, object c)
    bool bRet = false;
    if (nIndex >= 0 && nIndex < trackBar1FileInfo.Length)
    if (c.Equals(trackBar1))
    pictureBox1.Load(trackBar1FileInfo[nIndex].FullName);
    bRet = true;
    if (bitmaps != null)
    if (nIndex >= 0 && nIndex < bitmaps.Length)
    if (c.Equals(trackBar2))
    pictureBox1.Image = bitmaps[nIndex];
    bRet = true;
    return bRet;
    Then the ConvertTo24 method:
    private Bitmap ConvertTo24(string inputFileName)
    sw = Stopwatch.StartNew();
    Bitmap bmpIn = (Bitmap)Bitmap.FromFile(inputFileName);
    Bitmap converted = new Bitmap(bmpIn.Width, bmpIn.Height, PixelFormat.Format24bppRgb);
    using (Graphics g = Graphics.FromImage(converted))
    // Prevent DPI conversion
    g.PageUnit = GraphicsUnit.Pixel;
    // Draw the image
    g.DrawImageUnscaled(bmpIn, 0, 0);
    //converted.Save(outputFileName, ImageFormat.Bmp);
    sw.Stop();
    return converted;
    Then ToStream method:
    public static Stream ToStream(Image image, ImageFormat formaw)
    var stream = new System.IO.MemoryStream();
    image.Save(stream, formaw);
    stream.Position = 0;
    return stream;
    What it does is taking a Bitmap image and make a doppler radar effect on it and detect color only places that there are pixels(clouds) in it.
    Here is a screenshot:
    You can see the doppler shape and it's moving around and highlight the places with clouds.
    So when i move the trackBar1 to the left each time on another Bitmap image it's showing the doppler effect and the clouds.
    The problem is with the trackBar2 scroll event:
    First when i'm running my program and enteric to this new form that scan the clouds and show the doppler radar effect a backgroundworker1 is working:
    private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
    BackgroundWorker bgw = (BackgroundWorker)sender;
    if (bgw.CancellationPending == true)
    return;
    else
    while (true)
    bitmaps = ImagesComparison.get_images_with_clouds(b1);
    for (int i = 0; i < bitmaps.Length; i++)
    bitmaps[i] = ConvertTo1or8Bit.ColorToGrayscale(bitmaps[i]);
    break;
    What it does is getting into bitmaps(Bitmap[])  15 new bitmaps from one given bitmap. The given bitmap is b1.
    b1 i'm using it in trackBar1 scroll event.
    All the new Bitmaps in bitmaps variable array are Format32bppArgb.
    While i checked on my hard disk the images(GIF type) i'm using with trackBar1 are all Bit Depth 8.
    The images i'm using with trackBar1 scroll event are GIF types and Bit Depth 8 on the properties.
    The images i'm using in trackBar2 are Bitmaps and they are Format32bppArgb.
    So first thing i thought to convert all the 15 Bitmaps in bitmaps to 8bit:
    for (int i = 0; i < bitmaps.Length; i++)
    bitmaps[i] = ConvertTo1or8Bit.ColorToGrayscale(bitmaps[i]);
    But it didn't work it's just turning them to black gray scale colors not what i was thinking about.
    In the backgroundworker completed event i'm converting the bitmaps to 24 like i'm doing with the Gifs in trackBar1 scroll event:
    private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
    trackBar2.Enabled = true;
    trackBar2.Maximum = bitmaps.Length -1;
    bitmaps[0].Save(ConvertedBmpDir + "\\bitmapsfirstimage.bmp");
    for (int i = 0; i < bitmaps.Length; i++)
    ConvertedBitmaps.Add(ConvertTo24(bitmaps[i]));
    ConvertedBitmaps[0].Save(ConvertedBmpDir + "\\ConvertedBitmapsFirstImage.bmp");
    label2.Text = "עיבוד הנתונים הסתיים";
    b1.Dispose();
    Then in the trackBar2 scroll event:
    private void trackBar2_Scroll(object sender, EventArgs e)
    LoadPictureAt(trackBar2.Value, sender);
    ConvertedBmp = ConvertedBitmaps[trackBar2.Value - 1];
    ConvertedBmp.Save(ConvertedBmpDir + "\\ConvertedBmp.bmp");
    mymem = ToStream(ConvertedBmp, ImageFormat.Bmp);
    backTexture = TextureLoader.FromStream(D3Ddev, mymem);
    scannedCloudsTexture = new Texture(D3Ddev, 512, 512, 1, Usage.Dynamic, Format.A8R8G8B8, Pool.Default);
    timer1.Stop();
    Button1Code();
    timer1.Start();
    The same i did with the trackBar1 scroll event.
    But the result in trackBar2 i'm getting without using the grayscale convertion is this:
    You can see that the color that make the scan now is more yellow or green/yellow and not the same like it is when i'm using the trackBar1.
    I can't figure out where the problem is:
    1. Maybe since the Bitmaps in the variable array bitmaps are all Format32bppArgb ?
    2. Maybe they are Bitmaps and not Gif types like the images in trackBar1 ?
    If it does working good with the gifs in trackBar1 scroll event then the whole code in the new form ScanningClouds is working fine so i will not add to here the whole ScanningClouds form code since it's long.
    The problem is somewhere with the Bitmaps formas or bits in the variable bitmaps.
    Maybe they are not the same or the right Bit Depth or maybe they are Bitmaps and should be Gifs.
    bitmaps = ImagesComparison.get_images_with_clouds(b1);
    This is the get_images_with_clouds method where i'm getting the new 15 Bitmaps.
    public static Bitmap[] get_images_with_clouds(Bitmap radar_image)
    int e = 0;
    int f = 0;
    int image_clock_area_x = 0;
    int image_clock_area_y = 0;
    int image_clock_area_x1 = 140;
    int image_clock_area_y1 = 21;
    Bitmap[] localImages;
    localImages = new Bitmap[15];
    Bitmap image;
    image = new Bitmap(Properties.Resources.radar_without_clouds);
    BitmapData bmD = null;
    BitmapData bmD2 = null;
    try
    bmD = image.LockBits(new Rectangle(0, 0, image.Width, image.Height), ImageLockMode.ReadWrite,
    PixelFormat.Format32bppArgb);
    bmD2 = radar_image.LockBits(new Rectangle(0, 0, radar_image.Width, radar_image.Height), ImageLockMode.ReadOnly,
    PixelFormat.Format32bppArgb);
    IntPtr sc0 = bmD.Scan0;
    unsafe
    int* p = (int*)sc0.ToPointer();
    int* p2 = (int*)bmD2.Scan0.ToPointer();
    for (e = image_clock_area_x; e < image_clock_area_x + image_clock_area_x1; e++)
    for (f = image_clock_area_y; f < image_clock_area_y + image_clock_area_y1; f++)
    Color clock_color = Color.FromArgb(p2[e + f * bmD2.Width]);
    p[e + f * bmD.Width] = clock_color.ToArgb();
    image.UnlockBits(bmD);
    radar_image.UnlockBits(bmD2);
    catch
    try
    image.UnlockBits(bmD);
    catch
    try
    radar_image.UnlockBits(bmD2);
    catch
    int c;
    for (c = 0; c < localImages.Length; c++)
    localImages[c] = new Bitmap(image);
    Bitmap new_image = new Bitmap(Properties.Resources.radar_without_clouds);
    Bitmap new_image1 = new Bitmap(Properties.Resources.radar_without_clouds);
    Bitmap localbmptest = black_and_white(new_image, radar_image);
    Image image1 = black_and_white(new_image, radar_image);
    image1.Save(@"c:\temp\testclouds666.jpg");
    Bitmap clouds = new Bitmap(image1);
    int x;
    int y;
    int a;
    int b;
    int d = 0;
    Bitmap redImage;
    redImage = new Bitmap(512, 512);
    using (Graphics g = Graphics.FromImage(redImage))
    g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
    g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.Half;
    g.Clear(Color.Red);
    BitmapData bmData = null;
    BitmapData bmData2 = null;
    BitmapData bmDataArray = null;
    try
    bmData = clouds.LockBits(new Rectangle(0, 0, clouds.Width, clouds.Height), ImageLockMode.ReadOnly,
    PixelFormat.Format32bppArgb);
    bmData2 = radar_image.LockBits(new Rectangle(0, 0, radar_image.Width, radar_image.Height), ImageLockMode.ReadOnly,
    PixelFormat.Format32bppArgb);
    IntPtr scan0 = bmData.Scan0;
    IntPtr scan02 = bmData2.Scan0;
    unsafe
    int* p = (int*)scan0.ToPointer();
    int* p2 = (int*)scan02.ToPointer();
    double h, mm;
    for (d = 0; d < localImages.Length; d++)
    bmDataArray = localImages[d].LockBits(new Rectangle(0, 0, localImages[d].Width, localImages[d].Height), ImageLockMode.ReadWrite,
    PixelFormat.Format32bppArgb);
    IntPtr scan0Array = bmDataArray.Scan0;
    int* pArray = (int*)scan0Array.ToPointer();
    for (a = 0; a < new_image.Width; a++)
    for (b = 0; b < new_image.Height; b++)
    Color color1 = Color.FromArgb(p[a + b * bmData.Width]);
    Color color2 = Color.FromArgb(p2[a + b * bmData2.Width]);
    if (color1.R != 0 || color1.G != 0 || color1.B != 0)
    h = color2.GetHue();
    mm = RadarAnalysis.Hue2MMPerHour(h);
    if (mm >= treshhold_array[14 - d])
    pArray[a + b * bmDataArray.Width] = color2.ToArgb();
    localImages[d].UnlockBits(bmDataArray);
    clouds.UnlockBits(bmData);
    radar_image.UnlockBits(bmData2);
    catch (Exception error)
    try
    clouds.UnlockBits(bmData);
    catch
    try
    radar_image.UnlockBits(bmData2);
    catch
    try
    localImages[d].UnlockBits(bmDataArray);
    catch
    Logger.Write("Error Exception ==> " + error);
    MessageBox.Show("Error Exception ==> " + error);
    return localImages;
    I think not sure but i think the problem is that the images on my hard disk i'm using with the trackBar1 scroll event are Gif type and the images i'm using with the trackBar2 scroll event are 15 Bitmaps.

    Hi,
    "But it didn't work it's just turning them to black gray scale colors not what i was thinking about."
    If you want it to be colored, you'll need to create a color-palette for the 8bppIndexed bitmaps. The keyword for this process is "Color-Quantization".
    The whole yellow-green pie you get is from the wrong format. If you convert the 32bpp bitmaps to 24 bpp bitmaps, you loose the alpha channel ("transparency"). You can manually set one color to "transparent" with the mMakeTransparent-method
    of the Bitmap class, or simply use gif-images (they are 8bpp with a transparent "key"-color)
    Regards,
      Thorsten

  • Any way to see sharp pixels in a bitmap close-up?

    Is there a way turn off antialias for a particular object (bitmap)?
    I want to fly the camera close to an image and see sharp edged pixels rather than a blur. Can this be done?

    Not really, but what makes you think antialiasing is active on this item?
    All you're doing when you scale or get closer to a bitmap is make the limited number of pixels into bigger pixels. It is not possible to create more pixels in Motion. go back to the source image's creation applciation and scale it up 200-400% and bring it back into Motion. You just need to make sure you aren't simply making the pixels bigger in the host application. You must find a way to create more pixels.
    bogiesan

  • Animated .gif has dither on bitmaps even if disabled

    I'm trying to create an animated .gif from Flash Pro.
    I set from Publish window to export a animated .gif with Smooth, with a custom Palette made in Photoshop (because default palette settings generate an awful result...) and with Dither set to none.
    The problem is that the reuslting .swf is perfet but the .gif has background bitmaps (bitmaps with no transparency, positioned below bitmaps with transparency) dithered with any setting I tried, the only mode I've found to remove the dither is to replace the bitmap with a vector image made in Flash.
    I already set the bitmaps as loseless png/gif, not jpg.
    I'm on CS5.5, anyone has a fix for this bug or a suggestion?

    Hi Jean
    I'm guessing that the palette solution offered by P_SJ
    doesn't apply to FireWorks? I'm not a FireWorks user, so I'm really
    not sure what that means. Other than perhaps referring to what I
    know as a transparent background color.
    Maybe try setting a background color to what your background
    is in Captivate?
    Cheers... Rick

  • How do I embed bitmaps into a built (.exe) LabVIEW application?

    I am trying to embedd bitmap images (icons) into the exe file of a built LabVIEW application. I tried it, and got them in a "data" folder. I want everything in the .exe file, you know, just like C/C++ or just about any other programming language.
    If anyone has any tips, I would be grateful.
    I know about embedding the images in the controls, but that is not my goal. I need images as files to be embedded, somehow, into the .exe. The reason is I am using the picture control to read the images, but they are static once they are read. If it is possible for the picture controls to somehow retrieve the images from some other source, that would work also.
    Otherwise, if someone knows how to dynamicall
    y embed bitmap or other images into buttons in an array, that would be useful as well.
    Thanks

    > I am trying to embedd bitmap images (icons) into the exe file of a
    > built LabVIEW application. I tried it, and got them in a "data"
    > folder. I want everything in the .exe file, you know, just like C/C++
    > or just about any other programming language.
    >
    > If anyone has any tips, I would be grateful.
    >
    > I know about embedding the images in the controls, but that is not my
    > goal. I need images as files to be embedded, somehow, into the .exe.
    > The reason is I am using the picture control to read the images, but
    > they are static once they are read. If it is possible for the picture
    > controls to somehow retrieve the images from some other source, that
    > would work also.
    >
    > Otherwise, if someone knows how to dynamically embed bitmap or other
    > images i
    nto buttons in an array, that would be useful as well.
    >
    Actually, many C and C++ programs, like LV itself have folders of data
    that aren't linked into their code. But, if that is what you are
    looking for, one pretty easy way is to load the images into memory and
    place them into a 2D array of data, a string etc. Make an array of
    these and make the value default. At runtime, you can now skip the file
    I/O, or you can write the data to a temporary on launch and read them
    back whenever you like.
    Greg McKaskle

  • Running the report in Bitmap and Character mode

    Hi,
    We have the reports which can run in both the character mode and Bitmap mode. The only problem I'm facing is font size in the character mode report. If the report is run in Character mode then the font size of the report will be greater. As the sizer is bigger, I'm getting the X symbol in the place of report. Can i reduce the size of the font. I'm using the font Tahoma (8 points). Reports 6i Version and Windows Xp is the OS.
    Regards,
    Alok Dubey

    Hi this may solve u'r problem
    In Oracle Reports Designer, bitmap mode, you can make "C"
    bold and in a different font and point size than "c". This
    is because you are generating postscript output.
    Postscript is a universal printer language and any
    postscript printer is able to interpret your different
    design instructions.
    In Oracle Reports Designer, character mode, the
    APPLICATIONS STANDARDS REQUIRE the report to be designed in
    ONE FONT/ ONE CHARACTER SIZE. Character mode reports
    generate ASCII output. In ASCII you cannot dynamically
    change the font and character size. The standard is in
    effect so a report prints as identically as possible from
    both conventional and postscript printers.
    by....
    stanma

  • Print quality poor on bitmap logos when printing from InDesign

    We have a studio of MACs. One of them prints this indesign document fine, the quality of the bitmap images looks like it does on screen.
    On all the other MACs printing to the same Printer the bitmap logos on the same document print out with really poor quality.
    Any ideas ?? This is driving me mad as have checked the printer settings and it appears they match the working MAC.
    Dont think its a driver thing as all other documents and anything other than bitmap logos print fine.

    They have said the following regarding the file type ...... They are saved as tif files but in photoshop they are converted to Bitmap under the Image>Mode>Bitmap option

  • Print a Bitmap to a chosen printer

    Hello all,
    One of our customers, has an implementation where some user data are stored as bitmap images on a server. Right now, the user can view those images and then choose to save them on the local PC . Those images are shown at SAP using the ABAP Bitmap Image Processing Class found on this blog
    /people/thomas.jung/blog/2007/09/05/abap-bitmap-image-processing-class
    Now the customer, is requesting that the user, instead of saving the file, should be able to print it on a printer that he chooses .
    The important part is, that the bitmap file should not be saved first on the user's computer .
    To be more specific, what we actually need, is to change this class, with another that will be printing the bitmap instead of saving it .
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
       EXPORTING DEFAULT_EXTENSION    = '.bmp'
                 DEFAULT_FILE_NAME    = lv_filename
                 FILE_FILTER          = 'Bitmap files (*.BMP)'
       CHANGING  FILENAME             = lv_filename
                 PATH                 = lv_path
                 FULLPATH             = lv_fullpath.
      CHECK NOT lv_fullpath IS INITIAL.
    Is this possible and if so, how ?
    Thank you

    Hi there,
    if you have the bitmap in binary format then you can try the following function calls
    RSPO_SR_OPEN
    RSPO_SR_WRITE_BINARY
    RSPO_SR_CLOSE
    Kostas

  • How do I stop the type from bitmapping?

    I updated my website to iweb 08 and had to rebuild various pages. but the biggest bad surprise was that while the type in the hyperlinks in the earlier version worked fine, now they are bitmapped. and it seems on some pages my type is all bad. it's like I don't have the typeface loaded or something (design elements are shifting and there are weird spaces here and there). but I checked fontbook and I do have it up and running…
    also, my drop shadows on picture boxes with drop shadows are dropping off when the site gets published.
    any thoughts?
    my link:
    http://web.mac.com/marcklein1/MarcKlein/HOMEMarcKlein.html

    I'm seeing something odd, too. I have a lengthy text block that ends up measuring about 36,000 pixels vertically. Inside is just Ariel text. I've applied some color, italics, and boldface here and there, but no drop shadow effects, outline effects, or anything else that should generate the very plainest HTML. Yet, iWeb keeps attempting to convert this block to a .PNG file, and failing due to the size. The error I receive when I attempt to publish to a folder is "Can't create the file 'shapeimage2_link0.png.' The disk may be damaged or full, or you may not have sufficient access privileges." I have about 32GB free on my disk, and the test folder just resides on my desktop.
    I was able to create the page over again, cutting and pasting the text from the huge block into a new text block on the new page. Then I deleted the problem page. It published a few times without a problem. After making some edits to a different page in a different site, however, the same problem returned, and iWeb again decided that text block needed to be an image.
    Bizarre.
    Looks like I can't dump BBEdit just yet...

  • What every developer should know about bitmaps

    This isn't everything, but it is a good place to start if you are about to use bitmaps in your program. Original article (with bitmaps & nicer formatting) at Moderator edit: link removed
    Virtually every developer will use bitmaps at times in their programming. Or if not in their programming, then in a website, blog, or family photos. Yet many of us don't know the trade-offs between a GIF, JPEG, or PNG file – and there are some major differences there. This is a short post on the basics which will be sufficient for most, and a good start for the rest. Most of this I learned as a game developer (inc. Enemy Nations) where you do need a deep understanding of graphics.
    Bitmaps fundamentally store the color of each pixel. But there are three key components to this:
    1.Storing the color value itself. Most of us are familiar with RGB where it stores the Red, Green, & Blue component of each color. This is actually the least effective method as the human eye can see subtle differences on some parts of the color spectrum more than others. It's also inefficient for many common operations on a color such as brightening it. But it is the simplest for the most common programming tasks and so has become the standard.
    2.The transparency of each pixel. This is critical for the edge of non-rectangular images. A diagonal line, to render best, will be a combination of the color from the line and the color of the underlying pixel. Each pixel needs to have its level of transparency (or actually opacity) set from 0% (show the underlying pixel) to 100% (show just the pixel from the image).
    3.The bitmap metadata. This is informat about the image which can range from color tables and resolution to the owner of the image.
    Compression
    Bitmaps take a lot of data. Or to be more exact, they can take up a lot of bytes. Compression has been the main driver of new bitmap formats over the years. Compression comes in three flavors, palette reduction, lossy & lossless.
    In the early days palette reduction was the most common approach. Some programs used bitmaps that were black & white, so 1 bit per pixel. Now that's squeezing it out. And into the days of Windows 3.1 16 color images (4 bits/pixel) were still in widespread use. But the major use was the case of 8-bits/256 colors for a bitmap. These 256 colors would map to a palette that was part of the bitmap and that palette held a 24-bit color for each entry. This let a program select the 256 colors out of the full spectrum that best displayed the picture.
    This approach was pretty good and mostly failed for flat surfaces that had a very slow transition across the surface. It also hit a major problem early on with the web and windowed operating systems – because the video cards were also 8-bit systems with a single palette for the entire screen. That was fine for a game that owned the entire screen, but not for when images from different sources shared the screen. The solution to this is a standard web palette was created and most browsers, etc. used that palette if there was palette contention.
    Finally, there were some intermediate solutions such as 16-bits/pixel which did provide the entire spectrum, but with a coarse level of granularity where the human eye could see jumps in shade changes. This found little usage because memory prices dropped and video cards jumped quickly from 8-bit to 24-bit in a year.
    Next is lossy compression. Compression is finding patterns that repeat in a file and then in the second case just point back to the first run. What if you have a run of 20 pixels where the only difference in the second run is two of the pixels are redder by a value of 1? The human eye can't see that difference. So you change the second run to match the first and voila, you can compress it. Most lossy compression schemes let you set the level of lossiness.
    This approach does have one serious problem when you use a single color to designate transparency. If that color is shifted by a single bit, it is no longer transparent. This is why lossy formats were used almost exclusively for pictures and never in games.
    Finally comes lossless. This is where the program compresses the snot out of the image with no loss of information. I'm not going to dive into what/how of this except to bring up the point that compressing the images takes substantially more time than decompressing them. So displaying compressed images – fast. Compressing images – not so fast. This can lead to situations where for performance reasons you do not want to store in a lossless format on the fly.
    Transparency
    Transparency comes in three flavors. (If you know an artist who creates web content – have them read this section. It's amazing the number who are clueless on this issue.) The first flavor is none – the bitmap is a rectangle and will obscure every pixel below it.
    The second is a bitmap where a designated color value (most use magenta but it can be any color) means transparent. So other colors are drawn and the magenta pixels are not drawn so the underlying pixel is displayed. This requires rendering the image on a selected background color and the edge pixels that should be partially the image and partially the background pixel then are partially the background color. You see this in practice with 256 color icons where they have perfect edges on a white background yet have a weird white halo effect on their edges on a black background.
    The third flavor is 8 bits of transparency (i.e. 256 values from 0 – 100%) for each pixel. This is what is meant by a 32-bit bitmap, it is 24-bits of color and 8 bits of transparency. This provides an image that has finer graduations than the human eye can discern. One word of warning when talking to artists – they can all produce "32-bit bitmaps." But 95% of them produce ones where every pixel is set to 100% opacity and are clueless about the entire process and the need for transparency. (Game artists are a notable exception – they have been doing this forever.) For a good example of how to do this right take a look at Icon Experience – I think their bitmaps are superb (we use them in AutoTag).
    Resolution
    Many formats have a resolution, normally described as DPI (Dots Per Inch). When viewing a photograph this generally is not an issue. But take the example of a chart rendered as a bitmap. You want the text in the chart to be readable, and you may want it to print cleanly on a 600 DPI printer, but on the screen you want the 600 dots that take up an inch to display using just 96 pixels. The resolution provides this ability. The DPI does not exist in some formats and is optional in others (note: it is not required in any format, but it is unusual for it to be missing in PNG).
    The important issue of DPI is that when rendering a bitmap the user may want the ability to zoom in on and/or to print at the printer's resolution but display at a lower resolution – you need to provide the ability for the calling program to set the DPI. There's a very powerful charting program that is useless except for standard viewing on a monitor – because it renders at 96 DPI and that's it. Don't limit your uses.
    File formats
    Ok, so what file formats should you use? Let's go from most to least useful.
    PNG – 32-bit (or less), lossless compression, small file sizes – what's not to like. Older versions of some browsers (like Internet Explorer) would display the transparent pixels with an off-white color but the newer versions handle it properly. Use this (in 32-bit mode using 8 bits for transparency) for everything.
    ICO – This is the icon file used to represent applications on the desktop, etc. It is a collection of bitmaps which can each be of any resolution and bit depth. For these build it using just 32-bit png files from 16x16 up to 256x256. If your O/S or an application needs a lesser bit depth, it will reduce on the fly – and keep the 8 bits of transparency.
    JPEG – 24-bit only (i.e. no transparency), lossy, small file sizes. There is no reason to use this format unless you have significant numbers of people using old browsers. It's not a bad format, but it is inferior to PNG with no advantages.
    GIF – 8-bit, lossy, very small file sizes. GIF has two unique features. First, you can place multiple GIF bitmaps in a single file with a delay set between each. It will then play through those giving you an animated bitmap. This works on every browser back to the 0.9 versions and it's a smaller file size than a flash file. On the flip side it is only 8 bits and in today's world that tends to look poor (although some artists can do amazing things with just 8 bits). It also has a set color as transparent so it natively supports transparency (of the on/off variety). This is useful if you want animated bitmaps without the overhead of flash or if bandwidth is a major issue.
    BMP (also called DIB) – from 1 up to 32-bit, lossless, large file sizes. There is one case to use this – when speed is the paramount issue. Many 2-D game programs, especially before the graphics cards available today, would store all bitmaps as a BMP/DIB because no decompression was required and that time saving is critical when you are trying to display 60 frames/second for a game.
    TIFF – 32-bit (or less), lossless compression, small file sizes – and no better than PNG. Basically the government and some large companies decided they needed a "standard" so that software in the future could still read these old files. This whole argument makes no sense as PNG fits the bill. But for some customers (like the federal government), it's TIFF instead of PNG. Use this when the customer requests it (but otherwise use PNG).
    Everything Else – Obsolete. If you are creating a bitmap editor then by all means support reading/writing every format around. But for other uses – stick to the 2+4 formats above.
    Edited by: 418479 on Dec 3, 2010 9:54 AM
    Edited by: Darryl Burke -- irrelevant blog link removed

    I don't think the comment about jpeg being inferior to png and having no advantages is fair. The advantage is precisely the smaller file sizes because of lossy compression. Saving an image at 80-90% quality is virtually indistinguishable from a corresponding png image and can be significantly smaller in file size. Case in point, the rocket picture in that blog post is a jpeg, as is the picture of the blogger.
    The statements about the TIFF format is slightly wrong. TIFF is sort of an all encompassing format that's not actually associated with any specific compression. It can be lossless, lossy, or raw. You can have jpeg, jpeg2000, lzw, packbits, or deflate (png) compressed tiff files. There's also a few compressions that specialize in binary images (used alot for faxes). In fact, the tiff format has a mechanism that allows you to use your own undefined compression. This flexibility comes at a price: not all image viewers can open a tiff file, and those that do may not be able to open all tiff files.
    Ultimately though, the main reason people use TIFF is because of its multipage support (like a pdf file), because of those binary compressions (for faxes), and because of its ability include virtually any metadata about the image you want (ex: geographical information in a "GeoTIFF").

  • How to use icon instead of bitmap for image on button in toolbar?

    Hello,
    I am trying to use an image that has a transparent background on one of the buttons on our custom toolbar in Adobe Acrobat.
    In the past we have been using the following code with Bitmaps to display the image and it has worked perfectly:
    ======================================================================
    AVIcon icon = LoadBitmap(gHINSTANCE, MAKEINTRESOURCE(IDB_OPTIONS_LARGE));
    toolButton = AVToolButtonNew(ASAtomFromString("IMGR:Options"), icon, true, false);
    ====================================================================
    Background info on the other objects:
    V0200_DATA* dataPtr = (V0200_DATA*) windowsData;
    gHINSTANCE = dataPtr->hInstance;
    Resource File:
    IDB__OPTIONS_LARGE BITMAP "Resources\\ImageOptions_Large.bmp"
    IDI_ICON1 ICON "Resources\\Image_Icon.ico"
    Unfortunately, these bitmaps are not transparent and end up showing the white background instead of the transparent one.
    I have tried using Icons and PNGs as my image but I have been unable to get anything to show up. Here is the code I am using to get the AVIcon:
    ===================================================================
    AVIcon icon = LoadImage(gHINSTANCE, MAKEINTRESOURCE(IDI_ICON1), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
    ===================================================================
    However, no image appears on the toolbar. I am able to use LoadImage with the bitmap, but I am unable to make it transparent, even when using the LR_LOADTRANSPARENT flag.
    If anyone can point me in the right direction I would greatly appreciate it!
    Thanks,
    Ryan

    I got it worked with PNG file. I got transparent backgrounds in toolbar and menus.
    below is my code,
    HRSRC resource = FindResource(gHINSTANCE, MAKEINTRESOURCE(IDB_SAVE_21_PNG), L"PNG");
    if( resource == NULL )
         //Unable to load resource
    DWORD resourceSize = SizeofResource(gHINSTANCE, resource);
    HGLOBAL glob = LoadResource(gHINSTANCE, resource);
    LPVOID resouceArray = LockResource(glob);
    ASUns8  *data = (ASUns8*)ASmalloc(resourceSize + 1);
    memcpy(data, resouceArray, resourceSize);
    AVIconDataRec  iconData;
    iconData.dataStm  =  ASMemStmRdOpen(( char  *)data, resourceSize);
    iconData.eColorFormat  =  kAVIconColor;
    void * iconBundle = AVAppCreateIconBundle6(kAVIconPNG, &iconData, 1); 
    AVToolButtonNew (ASAtomFromString("PFXDOC:Pfx_DocumentToolSave"),
                                            iconBundle, true, false);
    Thanks & Regards
    Prakash

Maybe you are looking for