Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6164291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:58:09+00:00 2026-05-23T21:58:09+00:00

I try to scale an image derivedfrom a file, to any (sensible) scale. The

  • 0

I try to scale an image derivedfrom a file, to any (sensible) scale.

The problem is, cairo somhow autoblurrs it. How can I fix/remove it? The aim is to see the individual pixels.

Thanks for any reply.

Edit: Some code, triggering on "draw" event, parent is a GtkDrawingArea

static gboolean
cb_event_draw (GtkWidget *obj, cairo_t *cr, gpointer data)
{
    guint width, height;

    width = gtk_widget_get_allocated_width (obj);
    height = gtk_widget_get_allocated_height (obj);
    _priv = ...; //some struct


//  cairo_save (cr);
    cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
    cairo_scale (cr, _priv->zoom, _priv->zoom);


    cairo_set_source_surface (cr, _priv->image, 0., 0.);
    cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
    cairo_pattern_set_filter (cr, CAIRO_FILTER_FAST); // no matter if this is there or not
    // it does actually, matter, works with this:
    // cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_FAST);
    cairo_paint (cr);

// print some markers at defined locations


    return FALSE;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:58:10+00:00Added an answer on May 23, 2026 at 9:58 pm

    I suspect that you need:

    cairo_pattern_set_filter(cairo_get_source(cr), CAIRO_FILTER_FAST);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Try as I might, I can't get a JNLP file to run locally (via
i'm try to determine the amount to scale down an image, which is in
I've a problem when I try to access the image property of one Core
Try loading this normal .jpg file in Internet Explorer 6.0. I get an error
Try running this in a .VBS file MsgBox(545.14-544.94) You get a neat little answer
This is the svg I try to embed: <script type=image/svg+xml> <svg width=200 height=200 style=background-color:
I am trying to scale an image without using the function gluScaleImage which is
i'm attempting to maximize the scale of an image so that it uses as
I need to scale down an image that has a height or width greater
how can I save a Bitmap Image to the sdcard with loosing it's original

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.