Rebinning with a non-integer factor I'm in doubt whether I should put this in the astronomy or rather the coding exchange, but since my interest goes out to the former I will try my luck here.

Suppose I have an image with a certain pixel scale $x$. I would like to rebin this to a larger pixel scale, $y$, but this is not an integer multiple - so I can't say, for instance, that every group of 4 pixels in the original grid will now be one big pixel in the new grid, and average their flux.
Rather, I'd like something like i.e. $y=2.3\cdot x$.

Is this routinely done in the astronomical community -- and if so, how?
What you're trying to do is change the pixel scale, but ultimately, you need to decrease the resolution of your image. I'm quite sure this can be done using a variety of image editing tools (even some free ones), but if you insist on doing this yourself, I can show you the general process. Let's say I have the image below, which for convenience is only 6x6 pixels in size.



I'll assume this image has a pixel scale of $p = 1\:\frac{''}{\text{pix}}$ and I want to convert it to an image with a pixel scale of $p'=1.5\:\frac{''}{\text{pix}}=1.5p$. This is effectively saying that I want the resolution of the image to decrease by a factor of $1.5$ and that each pixel in the $p'$ image will be comprised of $1.5^2$ pixels from the $p$ image. This is easily done by defining the new pixel grid over the old one and determining the new pixel "color" as the weighted mean of the old pixels which exist in your new, larger pixel.



For convenience, I'm going to define a coordinate system where the pixels are at position $(x,y)$ where $(0,0)$ is the top left pixel and $x$ and $y$ increase to the right and down respectively. This is a common coordinate system for images in programming.

Let's look at pixel $(0,0)$ in the $p'$ image. This is comprised of pixels $(0,0)$, $(1,0)$, $(0,1)$, and $(1,1)$ from the $p$ image. Specifically, the fractions of these pixels in our new pixel are $1$, $0.5$, $0.5$, and $0.25$ respectively. These fractions will become the weights.

What you need to do then is look at your four pixels in the $p$ image and determine their color/brightness/property-you're-trying-to-merge. For this simple case, I'll just use a number from zero (white) to one (black) that represents the magnitude of the pixel, but the same process applies no matter what your pixel information contains, be it an RGB value or whatever else. By looking at my four pixels in the $p$ image, I see the magnitudes are $0.05$, $0.05$, $0.25$, and $0.15$ respectively.

The new pixel's magnitude is then the weighted average of these.

$$p'_{00,\text{mag}} = \frac{1\times p_{00,\text{mag}} + 0.5\times p_{10,\text{mag}} + 0.5\times p_{01,\text{mag}} + 0.25\times p_{11,\text{mag}}}{1.5^2} = \frac{1\times 0.05 + 0.5\times 0.05 + 0.5\times 0.25 + 0.25\times 0.15}{1.5^2} = \boxed{0.1056}$$

The process is the same for each pixel in the $p'$ image. Hopefully you can see how this process would generalize for any new pixel scale. The hard part is determining where your new pixels will be and which pixels of your original image will comprise the new pixel. Once you know that, you simply average them together, weighted by the fraction of the original pixels that make up the new pixel. With a little bit of effort, this could all be fairly easily automated by a program and you'd only need to input the new pixel scale and the original image and it could output a new image at the new pixel scale.

One problem you might run into is that your new image can't be subdivided perfectly. E.g., if, in the above example, you wanted a new scale of $1.4$, you'd still wind up with a new $p'$ image of 4x4 pixels, but you'd only be able to cover 5.6x5.6 pixels of the original image and you'd necessarily have to cut off part of your image, thus losing some information. It'd be up to you to decide what you cut off.