Announcement

Collapse
No announcement yet.

Graphic stretch and bitmap distortion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Barry Marks
    replied
    Originally posted by Chris Holbrook View Post
    I have a sneaking feeling that GDIPLUS could do it better, but I have not yet used it on a GRAPHIC WINDOW. I don't see why it should be difficult - but then I an the eternal optimist.
    GRAPHIC RENDER is what I'm using now and it works just fine. It does as good a job reducing the image as Irfanview does. Maybe it's using GDIPLUS and GRAPHIC STRETCH isn't. I don't know. My problem is solved but it would be nice to know what's going on.

    Barry

    Leave a comment:


  • Chris Holbrook
    replied
    Originally posted by Barry Marks View Post
    Does anyone have any ideas about this? Is there a better approach to this?
    I have a sneaking feeling that GDIPLUS could do it better, but I have not yet used it on a GRAPHIC WINDOW. I don't see why it should be difficult - but then I an the eternal optimist.

    Leave a comment:


  • Barry Marks
    replied
    did you stretch with the %HALFTONE stretchmode?
    No I didn't but I just tried that and it did improve it but it still wasn't very good. GRAPHIC RENDER, on the other hand, does a good job.

    Thanks,
    Barry

    Leave a comment:


  • Paul Dixon
    replied
    Barry,
    did you stretch with the %HALFTONE stretchmode?

    Paul.

    Leave a comment:


  • Barry Marks
    replied
    Well, I just solved the problem by using GRAPHIC RENDER instead of GRAPHIC STRETCH as shown in the Pwrpaint sample. But I have no idea why GRAPHIC STRETCH doesn't work as well.

    Any ideas, anybody?

    Thanks,
    Barry

    Leave a comment:


  • Barry Marks
    started a topic Graphic stretch and bitmap distortion

    Graphic stretch and bitmap distortion

    I'm using PBWin 9 and DDT in Vista Home Premium. I'm loading bitmap files into an in-memory bitmap with GRAPHIC BITMAP LOAD, getting it's size, calculating the size graphic control I need to place it confortably on my dialog and then creating the graphic control and moving it into it with GRAPHIC STRETCH.

    This is all working just fine but if the bitmap is more than just a little bigger than I have room for there's a lot of distortion. Really a lot. But I can use Irfanview to shrink the picture to close to the right size and try it again there's no distortion. It seems as though GRAPHIC STRETCH's resizing method is a poor one.

    I don't think it's anything I'm doing wrong although it may well be that this isn't the best approach to doing this. The process is pretty straightforward and, except for the distortion, seems to be working fine. And there's no distortion if the bitmap file is within about 20% of the size of the control that's created for it. More than that and there is.

    Does anyone have any ideas about this? Is there a better approach to this? Am I doing it wrong and not realizing it? I'd like this thing to be able to deal with any size bitmap. If I can't solve this I can live with it. It's a program for my own use and I can use Irfanview to pre-shrink the bitmaps but I'd rather not and also I'd like to know what's going on.

    Any suggestions will be very much appreciated.

    Thanks,
    Barry
Working...
X
😀
🥰
🤢
😎
😡
👍
👎